I would like to perform a generic test of user id for all forms in a database, so that only certain people have editing rights. Here's what I have:
In the On Load event of the form, I have
In module1 I have the following code:
Code: Select all
Public TheForm as string
Sub Security ()
If environ("UserName") = "Bob" then
TheForm.AllowEdits = True
Else: TheForm.AllowEdits = False
End If
I'm getting an "Invalid Qualifer" error. I'm thinking I don't have the form Name variable dimensioned correctly. How should I dimension it?