Minimise, Restaure, Close

  • Thread starter Thread starter StePie
  • Start date Start date
S

StePie

I would like to make my users to use only my forms to navigate and to close
my application. How can I make disappear the three icons on the title line
of MS Access... Thank you for your help..
 
If you're referring to the min, max and close buttons for the main Access
window, I don't believe it's possible. However, you could use a forms Unload
event to prevent Access from closing. Here is one example of how to do it.

Supposing you have your own close button called cmdClose on your form, add a
checkbox called chkCloseFlag somewhere on your form and set it's visible
property to no. In the forms On Open event set the check box to true;

Private Sub Form_Open()

Me.chkCloseFlag = True

End Sub

Then in the Click event for the close button, set the checkbox to false
before closing the form;

Private Sub cmdClose_Click()

Me.chkCloseFlag = False
Docmd.Close

End Sub

Finally in the Unload event, verify the value of the checkbox;

Private Sub Frorm_Unload(Cancel As Integer)

If me.chkCloseFlag = True Then
Cancel = True
MsgBox "Please use the Close button to exit the application"
End If

End Sub

If the form can't close then Access can't close.
 
You can set the property for the close button to no, you can set the property
for the max/ min to neither and set the property for the control box to no
 
You can also set the border to none.
--
Bob Larson
Access World Forums Super Moderator
Utter Access VIP
Tutorials at http://www.btabdevelopment.com
If my post was helpful to you, please rate the post.
__________________________________
 
For the form window yes, but I think the OP is talking about the main Access
window. Are you saying there is a way do disable those buttons?
 
Back
Top