[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Access Page Object reference

Posted on 2009-05-18
10
Medium Priority
?
270 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
  • 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
Configuration Guide and Best Practices

Read the guide to learn how to orchestrate Data ONTAP, create application-consistent backups and enable fast recovery from NetApp storage snapshots. Version 9.5 also contains performance and scalability enhancements to meet the needs of the largest enterprise environments.

 
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 750 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Traditionally, the method to display pictures in Access forms and reports is to first download them from URLs to a folder, record the path in a table and then let the form or report pull the pictures from that folder. But why not let Windows retr…
This article shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with …
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…
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…

868 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