Hey there
I have a form, which is hidden. The form starts up using the AutoExec macro. I want on other forms, to deactivate certain buttons with certain users. I do this using the following:
In the macro, the form opens, with a table in it with user names en workgroups. The where condition when the form opens is:
[username]=CurrentUser()
This way, the value on the form is always the person who is logged on to the DB.
Now, on another form I have the following piece of code:
This was just to test things, but now I get the error that the form doen not exist or can't be found..
Every name is right, no typos...
What do I do wrong??
I have a form, which is hidden. The form starts up using the AutoExec macro. I want on other forms, to deactivate certain buttons with certain users. I do this using the following:
In the macro, the form opens, with a table in it with user names en workgroups. The where condition when the form opens is:
[username]=CurrentUser()
This way, the value on the form is always the person who is logged on to the DB.
Now, on another form I have the following piece of code:
Code:
Private_Sub Form_Open(Cancel As Integer)
If [Forms]![frmSecure]![workgroup] = "shopuser"
cmdOpenFormSettings.Enabled = False
End If
End Sub
This was just to test things, but now I get the error that the form doen not exist or can't be found..
Every name is right, no typos...
What do I do wrong??