Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms Programming / May 2007

Tip: Looking for answers? Try searching our database.

event needed before Tab Control change

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Krista H - 30 May 2007 07:44 GMT
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?
Baz - 30 May 2007 08:57 GMT
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.

> Access 2003
> I have a switchboard form with 3 tab control pages. One of the pages is an
[quoted text clipped - 19 lines]
> 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?
Krista H - 30 May 2007 15:58 GMT
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'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.
[quoted text clipped - 29 lines]
> > 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?
Baz - 30 May 2007 17:00 GMT
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.

> 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?
[quoted text clipped - 32 lines]
> > > 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?
Krista H - 30 May 2007 17:09 GMT
ok thanks for the clarification, I will try that and see how it goes.

> 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
[quoted text clipped - 43 lines]
> event
> > > > prior to the change event that I should put this code in?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.