How do I hide message boxes when running a make table query in Ac.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am using a make table query to pull an email address from information in
several different tables. I'm then using the address in the TO section of
the sendobject command. I would prefer that the user not see the message
prompts when the click the email button. I've managed to remove the first
message by using tools...options...file/edit and changing the confirmation
settings. However, I can't seem to get rid of the prompt of deleting the
table. Anyone have any suggestions?
 
Use code like
DoCmd.SetWarnings False
'your other code goes here
DoCmd.SetWarnings True
 
Turning SetWarnings off before running the query will probably work.

A better solution would be to Execute the query statement like this:
dbEngine(0)(0).Execute "DROP TABLE Table1;", dbFailOnError
because that still notifies you if there is an error, but without
confirmation of the delete.
 
Back
Top