Referencing controls on a 2010 Navigation Form
Posted on 2011-09-09
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?