If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Prevent 'Dialog Box' from popping up
I have the following code in the main switchboard (in Access 2002):
'Delete imported Expireds records in TaxDB table DoCmd.RunSQL "DELETE TaxDB.*, TaxDB.LastName FROM TaxDB WHERE (((TaxDB.LastName) Is Null)); ", -1 This code is executed at start up. When the program is loaded a dialog box pops up, requesting to verify that I want to have n records deleted. Is there a way to keep the dialog box from popping up? Thanks, Tony |
#2
|
|||
|
|||
Prevent 'Dialog Box' from popping up
Tony,
Use the DoCmd.SetWarnings Method. Before your code add DoCmd.SetWarnings False and after it add DoCmd.SetWarnings True Be sure to reset it to true or you won't get other message that you may be wanting! Daniel P "TonyU" wrote: I have the following code in the main switchboard (in Access 2002): 'Delete imported Expireds records in TaxDB table DoCmd.RunSQL "DELETE TaxDB.*, TaxDB.LastName FROM TaxDB WHERE (((TaxDB.LastName) Is Null)); ", -1 This code is executed at start up. When the program is loaded a dialog box pops up, requesting to verify that I want to have n records deleted. Is there a way to keep the dialog box from popping up? Thanks, Tony |
#3
|
|||
|
|||
Prevent 'Dialog Box' from popping up
Thanks Daniel
"Daniel" wrote in message ... Tony, Use the DoCmd.SetWarnings Method. Before your code add DoCmd.SetWarnings False and after it add DoCmd.SetWarnings True Be sure to reset it to true or you won't get other message that you may be wanting! Daniel P "TonyU" wrote: I have the following code in the main switchboard (in Access 2002): 'Delete imported Expireds records in TaxDB table DoCmd.RunSQL "DELETE TaxDB.*, TaxDB.LastName FROM TaxDB WHERE (((TaxDB.LastName) Is Null)); ", -1 This code is executed at start up. When the program is loaded a dialog box pops up, requesting to verify that I want to have n records deleted. Is there a way to keep the dialog box from popping up? Thanks, Tony |
Thread Tools | |
Display Modes | |
|
|