testing for existence of form

  • Thread starter Thread starter Ben White
  • Start date Start date
B

Ben White

Is there a way to test for the existence of a form (a built in function or
some such as opposed to knocking something up in VB) before I attempt to
delete it in a macro, or alternatively is there a way to suppress the error
message so that it continues with the rest of the macro even if it can't
find the form? I'm using Access 2000.

Apologies in advance if the answer to this is really obvious.

Cheers

Ben
 
I do not know how to in a macro but if your objective is to
delete a form whether it exists or not and not get an error
message here is 2 lines of code.

On Error Resume Next
DoCmd.DeleteObject acForm, "FormName"

I am sure one of the experts know the way in a macro

Jim
 
Back
Top