Solved

Access Page Object reference

Posted on 2009-05-18
10
251 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
Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

 
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

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

Question has a verified solution.

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

Phishing attempts can come in all forms, shapes and sizes. No matter how familiar you think you are with them, always remember to take extra precaution when opening an email with attachments or links.
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

733 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