Solved

Access Page Object reference

Posted on 2009-05-18
10
215 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
 
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
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

 

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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Join & Write a Comment

I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

759 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now