The area's are certain forms and certain fields.
I would like a global password routine to pass into events that prevent users from access unless they have the correct password.
On opening a form I can add something like (example):
Code: Select all
Dim PassWord As String
PassWord = InputBox("Enter Password")
If PassWord = "YourPassword" Then
' Open Form
exit sub
Else
MsgBox ("You're not authorized")
DoCmd.Close acForm, Me.Name
End If
Does anyone know a way to add a password routine into say modUlilities ( my utilities module ) so I can call the routine whenever it is required for forms and controls?
It would make life easier. The call function would have to go into the VBA routine for each instance instead of a macro or =PasswordFunction() in the properties window.
(I think I've explained this adequately !!)
Regards