A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Prevent 'Dialog Box' from popping up



 
 
Thread Tools Display Modes
  #1  
Old March 21st, 2007, 02:48 PM posted to microsoft.public.access.forms
TonyU
external usenet poster
 
Posts: 2
Default 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  
Old March 21st, 2007, 03:09 PM posted to microsoft.public.access.forms
Daniel
external usenet poster
 
Posts: 1,017
Default 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  
Old March 28th, 2007, 05:41 PM posted to microsoft.public.access.forms
TonyU
external usenet poster
 
Posts: 2
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 04:24 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.