Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Take away the X to Close an Access Database

Status
Not open for further replies.

dead7

Programmer
Jun 8, 2004
79
US
Can you take away the X in the top right corner to close a database?
 
you can set the properties to not show the Min/Max and Close buttons, but as far as I know, there is no way to hide the "X" on the Access bar itself at the very top.

"The secret of teaching is to appear to have known all your life what you learned this afternoon
 
there is a FAQ on this site about this issue. Search for it. But here is the code from that. Once you load this form, you can not close the database without using the forms button.

Option Compare Database
Option Explicit
Public blnOKToClose As Boolean

Private Sub Command0_Click()
blnOKToClose = True
DoCmd.Quit
End Sub
Private Sub Form_Unload(Cancel As Integer)
Cancel = Not blnOKToClose
End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top