Solved

Access Page Object reference

Posted on 2009-05-18
10
258 Views
Last Modified: 2012-05-07
I am trying to reference a Page (tab) in a Macro. The page name is "MIVPage".  I would like reference this in a Macro where I can change the ENABLE property. What is the syntax that I need?
0
Comment
Question by:ktsCatalyst
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 7
  • 3
10 Comments
 
LVL 10

Expert Comment

by:therealmongoose
ID: 24410995
Me.tabTabName.Pages("PageName").Enabled = true
0
 
LVL 10

Expert Comment

by:therealmongoose
ID: 24411000
Me.tabTabName.Pages("MIVPage").Enabled = true
0
 

Author Comment

by:ktsCatalyst
ID: 24411085
therealmongoose.

I am changing the tab control at the time I "Load" the form based on login credentials.  I am getting an error using "Me."  Should I put the form name here instead?
0
Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

 
LVL 10

Expert Comment

by:therealmongoose
ID: 24411106
Yes.. think this should work... It may be worth considering using a default on the page so is always not enabled when form opens, but this may depend on what actions are happening with the form laod, and what functionalilty you are building...
0
 
LVL 10

Expert Comment

by:therealmongoose
ID: 24411114
forms!frmYourFormName!tabTabName.Pages("MIVPage").Enabled = true
0
 

Author Comment

by:ktsCatalyst
ID: 24411597
Here's my syntax.
I'm still getting an error that it is misspelled or refers to a control that doesn't exist
My form Name is "frm_Mfg_MIVS"
Tab is "TabCtl1"
forms!frm_Mfg_MIVS!TabCtl1.Pages("MIVPage")

Open in new window

0
 
LVL 10

Expert Comment

by:therealmongoose
ID: 24411938
Where are you firing the code from? is it in the on open event of the form that contains the tab pages?
If so
Me.TabCtl1.Pages("MIVPage").enabled = true
Should work...
 
 
0
 

Author Comment

by:ktsCatalyst
ID: 24411995
I just found the answer.  I am changing this through a 'SetProperty' macro.  The only refernece that I need is "MIVPage".  I do not need to reference form, tab, or page. I put this where it is asking for object and worked.
thanks for your help.
0
 
LVL 10

Expert Comment

by:therealmongoose
ID: 24412010
Great...
0
 
LVL 10

Accepted Solution

by:
therealmongoose earned 250 total points
ID: 24441538
Hi, If my comments helped you then please allocate points - if you feel they were of no help, but you've solved the problem, then please request a deletion of the question.....
 
Cheers,
 
Mongoose
0

Featured Post

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

696 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question