A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Code for Tabs on a Form



 
 
Thread Tools Display Modes
  #1  
Old April 15th, 2008, 04:01 AM posted to microsoft.public.access.forms
LLFK
external usenet poster
 
Posts: 3
Default Code for Tabs on a Form

I created a page on my form (using Tab Control from the toolbox) called
Maintenance Users Only. I set the visible property for that page to NO.
From another page on the form I have a command button that when clicked runs
an Inputbox to ask the user for a password. If the user enters the correct
password, I want the page, called "Maintenance Users Only" to become visible.
I can't come up with the proper syntax to specify the "Maintenance Users
Only" page. If I wanted a correct password to make a field visible, I would
type [Forms]![FrmMainForm]![fieldname].Visible = 0 but what is the right way
to specify the page?
  #2  
Old April 15th, 2008, 04:32 AM posted to microsoft.public.access.forms
Steve Schapel
external usenet poster
 
Posts: 1,422
Default Code for Tabs on a Form

LLFK,

If you wanted a correct password to make a control visible, you would type:
Me.fieldname.Visible = True

It is exactly the same with the page on the Tab Control.

In design view of the form, select the page, and then look at the
properties. In particular the Name property, which will tell you the
name of the page.

Then your code will be like this:
Me.NameOfPage.Visible = True

--
Steve Schapel, Microsoft Access MVP

LLFK wrote:
I created a page on my form (using Tab Control from the toolbox) called
Maintenance Users Only. I set the visible property for that page to NO.
From another page on the form I have a command button that when clicked runs
an Inputbox to ask the user for a password. If the user enters the correct
password, I want the page, called "Maintenance Users Only" to become visible.
I can't come up with the proper syntax to specify the "Maintenance Users
Only" page. If I wanted a correct password to make a field visible, I would
type [Forms]![FrmMainForm]![fieldname].Visible = 0 but what is the right way
to specify the page?

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 06:23 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.