Hi,
The easiest way to do this is to split the database and make a seperate front end for managers. Lock the form in the first front end, and unlock it in the managers' front end. I do this a lot.
Password protect the different versions of the front ends.
You can also implement database security, but ONLY DO THIS ON A MICROSOFT NETWORK! If you try this on a network that is not capable of passing MS login credentials (like NetWare) then running the database security wizard will lock the database forever. Hehe.
You can also do a lame kludge like this: Have two buttons to open a locked and unlocked version of the same form (for each locked field, Properties>Data>Enabled=No, Locked=Yes), and then on the manager's button, put this code:
'==========
Dim stPassword As String
Dim stDocName As String
stDocName = "YourLockedFormName"
stPassword = InputBox("Enter Password:", vbOkOnly)
If stPassword = "yourpassword" Then
DoCmd.OpenForm stDocName etc...
Else:
MsgBox "Improper Password" & vbCrLf & "Access Denied"
End If
'==========
The minor problem with this is that the input box takes the password in plain text.
Most users will never be able to figure this one out. Although they may know <f11> and just open the form directly.
Um, make sure to set the database window as hidden on your start up options, and name the manager's form something stupid so no one guesses at it (good if there are a lot of forms... of course, they can always open the table directly... anywho...)
HTH.
mmcdonal
|