Warning Messages

jeffcullina

New member
Local time
Today, 02:14
Joined
Jul 11, 2001
Messages
7
Two part question. I have a database that removes and appends tables based on a search performed by the user. On my system I can turn off the confirmation messages by going through the tools/options menu. Is there a way to turn them off via code for any user on a different system in liu of going to each system and going through the tools menu?

Related question. Instead of testing for the existence of a table that I am deleting (sometimes it does not exist at all), I am using On Error GoTo Next, which works fine. Problem is the use of that command seems to trigger the confirmation messages that I already have turned off. When I build and then append to a new table, I am prompted by a message box. I would like to do away with those messages. Reseting to On Error GoTo 0 does not help.
 
DoCmd.SetWarnings False
Append query code
DoCmd.SetWarnings True
 
Hi Jeff
I wrote this little function for deleting tables. I am not getting any confirmation messages even though I seem to be using the same technique that you tried to usu.
Anyway, here you go:
'Delete table - if table does not exist or can't be deleted set the fancktion to false else true
Public Function Delete_Table(str_Table_Name As String) As Boolean
On Error Resume Next
DoCmd.DeleteObject acTable, str_Table_Name
If Err.Number <> 0 Then Delete_Table = False Else Delete_Table = True
End Function
 
It is always something extremely easy. I used DoCmd.SetWarnings False and it works great. I couldn't find that simple command in the help or in any of the books. Thanks.
 

Users who are viewing this thread

Back
Top Bottom