Tina Norris Fields
tinanfields at torchlake.com
Tue Jun 24 16:51:18 CDT 2008
Lambert, Thanks for that very good additional point. Yup, I'll do that and make it a habit. Tian Heenan, Lambert wrote: > Just to add one thing. In any routine that turns warnings off, be sure that > the routine has an error handler and that the warnings are turned back on in > the error handler. If you don't do that and an error does happen, then your > application will merrily run on, with warnings turned off when you most > probably don't want that to be the case. > > So for example... > > Sub SomeSub > > On Error Goto Error_SomeSub > > DoCmd.SetWarnings False > DoCmd.OpenQuery "qryYourQuery" > DoCmd.SetWarnings True > Exit Sub > :Error_SomeSub > DoCmd.SetWarnings True > ' The do whatever to handle the error > ... > End Sub > > > Lambert > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Tina Norris > Fields > Sent: Tuesday, June 24, 2008 3:25 PM > To: Access Developers discussion and problem solving > Subject: Re: [AccessD] How to turn off the warning messages > > Thanks Rusty - that's exactly what I needed. > Tina > > rusty.hammond at cpiqpc.com wrote: > >> To turn the warnings off before running the query docmd.setwarnings >> false >> >> Then to turn then back on after running your query docmd.setwarnings >> true >> >> ie >> >> DoCmd.SetWarnings False >> DoCmd.OpenQuery "qryYourQuery" >> DoCmd.SetWarnings True >> >> HTH >> >> Rusty >> >> -----Original Message----- >> From: accessd-bounces at databaseadvisors.com >> [mailto:accessd-bounces at databaseadvisors.com]On Behalf Of Tina Norris >> Fields >> Sent: Tuesday, June 24, 2008 1:51 PM >> To: 'Access Developers discussion and problem solving' >> Subject: [AccessD] How to turn off the warning messages >> >> >> Hi Group, >> >> I know we've talked about this one before, but at that time I wasn't >> paying attention. Now, I need to know how to do it, so, I apologize >> before putting the question out there to you all. >> >> I have a form with a calendar control for setting the "deposit date." >> Then there is a button for running a make-table query that will build >> a temporary table of contributions matching that "deposit date." I >> want it to run without warning the user about deleting the existing >> table, or about making a new table, or about appending the records to the >> > new table. > >> Once the table is created, the user will click a button to get the >> Word document into which the contributions information will be merged. >> >> I need to know if I can turn off those warning messages generated by >> the make-table query - and how to do it. >> >> Thanks very much, >> Tina >> >> > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com >