Request some assistance,
I created a button with the following vba action statement
Private Sub Refreshtxttrig_Click()
DoCmd.RunSQL "drop table [Table Name]"
Exit_CmdImportExcel_Click:
End Sub
(This statement deletes a specific table within access.)
It works well, except when the Table is missing or I accidently click twice, it executes the statement but brings up a "runtime error.." instead.
I would like to create a statement that will bring up a MsgBox instead of a runtime error and tells the user that the Table has already been purged.
Is this possible to do?
Your help is very much appreciated.
R,
Tony
I created a button with the following vba action statement
Private Sub Refreshtxttrig_Click()
DoCmd.RunSQL "drop table [Table Name]"
Exit_CmdImportExcel_Click:
End Sub
(This statement deletes a specific table within access.)
It works well, except when the Table is missing or I accidently click twice, it executes the statement but brings up a "runtime error.." instead.
I would like to create a statement that will bring up a MsgBox instead of a runtime error and tells the user that the Table has already been purged.
Is this possible to do?
Your help is very much appreciated.
R,
Tony
Last edited: