don't want to show message box

anwardada

New member
Local time
Today, 15:36
Joined
Jan 14, 2007
Messages
9
hi in access when i use append query i see this message "your are about to run a append query that will modify your table " i don't wanna show this mesage because i am using vba userform to call this append query so please tell me the solution

regards
anwar khan
 
In your code, use this before the code that runs the query:
Code:
DoCmd.SetWarnings(False)
and then remember to put this right after the code that runs the query
Code:
DoCmd.SetWarnings(True)
and you should put an error handler in and then put the one that sets it true in the error handler as well. Because, if you don't, you could wind up with no error messages showing up, ever again if the query doesn't run and generates an error. Then, you won't get save confirmations, etc.
 
thanks alot it works
regards anwar



boblarson said:
In your code, use this before the code that runs the query:
Code:
DoCmd.SetWarnings(False)
and then remember to put this right after the code that runs the query
Code:
DoCmd.SetWarnings(True)
and you should put an error handler in and then put the one that sets it true in the error handler as well. Because, if you don't, you could wind up with no error messages showing up, ever again if the query doesn't run and generates an error. Then, you won't get save confirmations, etc.
 
Also, note that using CurrentDb.Execute "YOUR SQL HERE" bypasses the warning messages as well, and you don't have to remember to do the DoCmd.SetWarnings stuff each time you want to skip the built-in warning messages.
 

Users who are viewing this thread

Back
Top Bottom