Solved

Access Page Object reference

Posted on 2009-05-18
10
226 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
Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

 

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

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

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

When you are entering numbers in a speadsheet, and don't remember what 6×7 is, you just type “=6*7" instead. It works in every cell! This is not so in Access. To enter the elusive 42 in a text box, you have to find a calculator, and then copy the re…
In Debugging – Part 1, you learned the basics of the debugging process. You learned how to avoid bugs, as well as how to utilize the Immediate window in the debugging process. This article takes things to the next level by showing you how you can us…
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…

912 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

20 Experts available now in Live!

Get 1:1 Help Now