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
Solved

Referencing controls on a 2010 Navigation Form

Posted on 2011-09-09
5
289 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 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 500 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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…
It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
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…
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…

856 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