Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

2013 Navigation Form Password Protect a tab

Status
Not open for further replies.

smalty

Technical User
Jan 9, 2005
74
0
0
GB
I am working in Access 2013. I am using a 'Navigation Form' (not a TAB control) with horizontal tabs When the user hits one of the three tabs currently available, before seeing anything in this tab the user must enter a password to continue.

The tab will contain 5 controls, consisting of 4 buttons and a sub-report none of which must be visible until the correct password has been entered.

The Navigation Form is fMain
The tab to be protected is btnWlinks
The 4 buttons are btn1-4
The sub-report control is srepWLinks

I have no idea where to start.......any ideas and assistance will be greatly appreciated

Smalty
 
Don't bind the subforms directly via the GUI properties in design mode.

set up a click event for the button part of the nav to dynamically bind the source form to the nav control...

Code:
  Me.Nav_Subform.SourceObject = 'my_form_name'
Me.Nav_Subform.Visible = True

Obviously before you bind the form to the control, you can popup your login prompt and only bind and display if valid credentials are provided.

I use Access 2010, where this nav control was first introduced, not sure if it suffers the same issue, but I found that the nav_form is set to a specific size, so if I dynamically load a form into the nav control I have to resize it to fit the bound sub form

Code:
    Me.Nav_Subform.Width = 4850
Me.Nav_Subform.Height = 3370

Remember form widths/heights are in weird MS Twips measurement, so it's usually trial and error to get the sizing exact.

"In complete darkness we are all the same, it is only our knowledge and wisdom that separates us, don't let your eyes deceive you."

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!"
Free Electronic Dance Music
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top