closing a form

A

Ann

I have multiple forms that I close with a command button with the code

DoCmd.Close acForm, "name of form"

It works for all my forms except one. These forms are just for data entry,
there are no subforms.

Thanks
 
O

Ofer

Check the OnUnload Property of the form, mybe it has in the code cancel=true,
that wont let the form close in some conditions
 
B

Bob Howard

You may wish to also try DoCmd.Close acForm,Me.Name

The name property is the name of the current form --- this save headaches if
you rename the form someday....
 
A

Ann

DoCmd.Close acForm, Me.Name worked, thanks guys!

Bob Howard said:
You may wish to also try DoCmd.Close acForm,Me.Name

The name property is the name of the current form --- this save headaches if
you rename the form someday....
 
Top