G
Guest
Access 2003
I have a switchboard form with 3 tab control pages. One of the pages is an
admin page that I want to password protect.
I used the ctrl_TabControl_Change() sub to trigger an admin login form
(acDialog) where the user enters the password, if the user enters the correct
password, proceed, if not set the tabcontrol.value to the main page.
Private Sub ctrl_TabControl_Change()
Select Case ctrl_TabControl.Value ' which page was selected
Case 2
If AdminRights() = False Then
Me.ctrl_TabControl.Value = 0
End If
End Select
End Sub
This works great except for one cosmetic issue I cannot figure out. The
switchboard form displays the admin page while the user is prompted for the
admin password. Is there a way to suspend the tab control change event till
after the user verifies the admin password. Or is there some other event
prior to the change event that I should put this code in?
I have a switchboard form with 3 tab control pages. One of the pages is an
admin page that I want to password protect.
I used the ctrl_TabControl_Change() sub to trigger an admin login form
(acDialog) where the user enters the password, if the user enters the correct
password, proceed, if not set the tabcontrol.value to the main page.
Private Sub ctrl_TabControl_Change()
Select Case ctrl_TabControl.Value ' which page was selected
Case 2
If AdminRights() = False Then
Me.ctrl_TabControl.Value = 0
End If
End Select
End Sub
This works great except for one cosmetic issue I cannot figure out. The
switchboard form displays the admin page while the user is prompted for the
admin password. Is there a way to suspend the tab control change event till
after the user verifies the admin password. Or is there some other event
prior to the change event that I should put this code in?