testing for existence of form

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
 
J

Jim/Chris

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top