Msg Dialog Box Prompt

Tony

Registered User.
Local time
Today, 16:08
Joined
Oct 30, 2008
Messages
16
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
 
Last edited:
Works AWESOME!

Thanks PBaldy!!!
R,

Tony
 
Happy to help Tony!
 

Users who are viewing this thread

Back
Top Bottom