Solved

Referencing controls on a 2010 Navigation Form

Posted on 2011-09-09
5
258 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
  • 3
  • 2
5 Comments
 
LVL 119

Expert Comment

by:Rey Obrero
Comment Utility
try

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

Expert Comment

by:Rey Obrero
Comment Utility

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

Author Comment

by:cekendricks
Comment Utility
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 119

Accepted Solution

by:
Rey Obrero earned 500 total points
Comment Utility
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
Comment Utility
Top Notch, and extremely timely assistance !
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Most if not all databases provide tools to filter data; even simple mail-merge programs might offer basic filtering capabilities. This is so important that, although Access has many built-in features to help the user in this task, developers often n…
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…
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 …

771 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

10 Experts available now in Live!

Get 1:1 Help Now