event needed before Tab Control change

  • Thread starter Thread starter Guest
  • Start date Start date
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'd have thought it more sensible to have your admin functionality as a
pop-up form so you can control access to it via a command button.

However, if you want to persist with your tab design, I think that the best
you can do is to make all the controls on the admin page invisible, and only
make them visible once the logon is successful.
 
I thought opening the admin form with window mode acDialog was the same as a
pop up, which is what I did. Am i missing something more basic?
 
I'm not talking about your login form, I'm talking about whatever is on your
admin tab page, and I'm suggesting to you that it should be a pop-up form
instead.
 
Back
Top