Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Referencing controls on a 2010 Navigation Form

Posted on 2011-09-09
5
Medium Priority
?
313 Views
Last Modified: 2012-05-12
I have an old .mdb that I am attempting to upgrade.  I have imported all of what I feel are the necessary tables, queries, forms, reports, and modules into a new .accdb database.  I have also incorporated several of the forms into a Navigational Form (frmNavigation; verticle tabs left style).  One of the forms ([Report Dates Entry Form] has vba code attached to a command button that needs to set the value of a date variable to the value of another control ([EndDate]) on the form.  In the old line of code this was accomplished by :

dteWeekEnd = Forms![Report Dates Entry Form]![EndDate].Value

After doing some reading I thought the that once the form was placed in the Navigation Form (attached to NavigationButton9) that the proper syntax would be:

dteWeekEnd = Forms![frmNavigation]![NavigationButton9].[Form]![EndDate].Value

But now I get an error stating "Object doesn't support this property or method
What am I doing wrong?
0
Comment
Question by:cekendricks
[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
  • 3
  • 2
5 Comments
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 36511044
try

dteWeekEnd = Forms![frmNavigation]![Report Dates Entry Form].[Form]![EndDate].Value
0
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 36511129

dteWeekEnd = Forms![frmNavigation]![Report Dates Entry Form].[Form]![EndDate].Value
-------------------------------------------------^^^^^^^^^^^^^^^^  use the subform control name
0
 

Author Comment

by:cekendricks
ID: 36511191
When I tried the first suggestion I get an error stating that "Access can't find the field 'Report Dates Entry Form'"

I don't understand the second statement....do you mean the control on the Navigation Form?  NavigationButton9 ?

I've already tried:
dteWeekEnd = Forms![frmNavigation]![NavigationButton9].[Form]![EndDate].Value

which didn't work either...I don't really think I understand which control you're referring to by 'Subform control name'
0
 
LVL 120

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 2000 total points
ID: 36511282
open the form in design view,  and click on the outer edge of the subform and open the property sheet
click on the ALL tab

see the image
subformControlname.jpg
0
 

Author Closing Comment

by:cekendricks
ID: 36511517
Top Notch, and extremely timely assistance !
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

In earlier versions of Windows (XP and before), you could drag a database to the taskbar, where it would appear as a taskbar icon to open that database.  This article shows how to recreate this functionality in Windows 7 through 10.
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
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…

730 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