You could hide the database window, disable stuff in Startup and disable the Shift key. In this way you'll force them to work only from forms.
So, follow these steps:
Tools->Startup
Clear all checkboxes
Display Form - select your switchboard.
Open a new module.
Change
Option Compare Database
with
Option Compare Binary
Paste the following code:
Sub DnDatabaseKey()
Dim Answer As Boolean
Dim myprp As DAO.Property
On Error GoTo ErrSetKey
If CurrentDb.Properties("AllowBypassKey"

.Value Then
CurrentDb.Properties("AllowBypassKey"

.Value = False
Exit Sub
End If
If InputBox("Enter password to gain access to database window"

= "WhateverPasswordYouWant" Then
Answer = True
Else
Answer = False
End If
SetProperty:
CurrentDb.Properties("AllowBypassKey"

= Answer
Exit Sub
ErrSetKey:
Select Case Err
Case 3270
Set myprp = CurrentDb.CreateProperty("AllowBypassKey", dbBoolean, Answer)
CurrentDb.Properties.Append myprp
Exit Sub
Case Else
MsgBox Err.Description
Exit Sub
End Select
End Sub
Change WhateverPasswordYouWant with...you know...whatever password you want...and remember it-it's case sensitive
![[smile] [smile] [smile]](/data/assets/smilies/smile.gif)
. If you forget it, you'll be back asking how to hack your own work
![[smile] [smile] [smile]](/data/assets/smilies/smile.gif)
.
Create a button (ButPassword) on your switchboard.
Right click your button, choose Code Builder and paste:
DnDatabaseKey
Save your switchboard form
Open it in Form view
Click the button
Close the database.
Open the database.
You won't be able to access practically anything.
Keeping Shift pressed will have no effect.
To enable Shift:
Open the database.
Click the password button.
Enter the correct password.
Close the database.
Open the database while keeping Shift pressed.
Click the password button again, otherwise the database will be 'unlocked' for any other user that happens to open the database at that time.
However, guys familiar to Access could still hack the disabled Shift...
HTH,
Dan
![[pipe] [pipe] [pipe]](/data/assets/smilies/pipe.gif)