Hi, all. I am sorry if I’m asking too much here.
Situation:
I have an application with a login form. Once you press the login button the login form is hidden (visible=False) to be
able to pass the user id and user rights to other forms or reports. In order to close the application the user needs to press a button in the swithcboard but that is not possible because of the hidden form.
Question: How do I activate the hidden form to close once the switchboard close application button is hit? Example where do I put the code, I need this to implement security access level properly like the one below:
If
Forms!frmLogin!cboUser.Column(4) <> 2 Then
MsgBox “You are not authorized to open this form!”, vbOkOnly +vbExclamation
Cancel = True
End
If
If the login form is not active then the above code will not work, that is why I have to hide it instead of closing it by DoCmd.Close “frmLogin”
The login form will remain open to enable the user navigate all forms or reports which he/she is authorized to until deciding to leave the app.
Regards
Chris