Create Table Message Box Warning

tonyb

Registered User.
Local time
Today, 14:25
Joined
Sep 10, 2001
Messages
10
I am running a make-table query from the code behind a command button. When the query runs a warning about the existing table being deleted pops up. The table being deleted is OK but how can I stop the warning appearing every time ??

Thanks in advance.
 
DoCmd.SetWarnings False

But make sure to set warnings back to true after the code has run its course.
 
tonyb,

Before your code to launch the query put in this code:

DoCmd.SetWarnings False

Then after your code and before the end sub put in:

DoCmd.SetWarnings True

So the end product will look something like this:

Private Sub MAke_table

DoCmd.SetWarnings False
DoCmd.Open your query
DoCmd.Setwarnings True
End Sub


This will turn off the warnings for the make table query, run the code, then turn them back on.

HTH,
Kevin
 
Many Thanks for your help and quick replies !
 

Users who are viewing this thread

Back
Top Bottom