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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hiding Database Window from User 1

Status
Not open for further replies.

1no7

Technical User
Jun 20, 2002
5
GB

Is there anyway in which I can permenently hide the database window, so the user can't recover it using the F11 key?

Also, is it possible to prevent the user from opening the database whilst holding down the 'SHIFT' key and again gaining access to the database window?

I'm using Access 97 if that makes any difference..
 
Yes

To Hide the database window click on tools and startup.
Uncheck all the boxes will do this.

To enable and disable the shift key is the following code

Private Sub Command0_Click()
On Error GoTo error

Dim db As Database
Dim prp As Property
Set db = CurrentDb
Set prp = db.CreateProperty("AllowByPassKey", dbBoolean, False)
db.Properties.Append prp
DoCmd.Beep
MsgBox "Shift Key Disabled", vbInformation


Exit Sub

error:

DoCmd.Beep
MsgBox "Shift Key already disabled", vbCritical

End Sub

Private Sub Command1_Click()

On Error GoTo error

Dim db As Database
Set db = CurrentDb
db.Properties.Delete "AllowByPassKey"
db.Properties.refresh
DoCmd.Beep
MsgBox "Shift Key Enabled", vbInformation


Exit Sub

error:

DoCmd.Beep
MsgBox "Shift Key already enabled", vbCritical


End Sub


All you do is create a form and place a hidden link on another form to it and place two buttons there one for enable and one for disable. David Lerwill
"If at first you don't succeed go to the pub"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top