Close button reappearing even though close button property is set to "No"

watrout

Registered User.
Local time
Today, 16:17
Joined
Feb 18, 2004
Messages
14
I have several forms for which I have created a command button to close the form. I had to add the command button because I needed to run a sub before the form closed that checked to make sure certain needed fields were filled in. I originally attached the procedures to the "on close" property of the form, but they did not run when the window's standard close button was used. The close buttons I created work fine but the window's standard close button keeps persisting in these forms even though I have the "close button" set to no. It seems to be dependant on the previous form’s properties. For instance if I use the switchboard form to open the above mentioned forms and the switchboard has the close button enabled, it is enabled in the form that is opened, regardless of that form's properties.

What is the best way to handle this problem? Can I insert code to automatically enable or disable the window’s close button in the forms “on current” or “on load” properties? If so what would that code look like?

Thanks
 
You could make your form a pop up. In the forms properties select Pop = Yes, modal = Yes and border style = Thin.

HTH
 
You can not "maximize" [docmd.maximize] your forms if you want the forms close "X" button in the upper right corner to not be displayed. Plus you have to set the forms "Control Box" property to "No" and resize the form so that it is not maximized.

HTH
 
Re: Close button reappearing even though close button property is set to "No"

You could make your form a pop up. In the forms properties select Pop = Yes, modal = Yes and border style = Thin.

HTH

:D this worked for me
 

Users who are viewing this thread

Back
Top Bottom