Hello,
I have a form that I use for navigation in my database. It consists of links to the left to swith between forms, and a subform in the middle. When a link to the left is clicked, I run code to switch the source fo the subform:
I want the form to "remember" the last record the user was on, so I created a table and am writing the primary key of the form to the table on the form's unload event. Then, on the form's load event, I'm looking up that key from the table.
When I open and close the form by itself, not as a subform of my navigation form, everything works fine.
When I open the form from the navigation screen, everything is fine.
When I switch to another form on the navigation screen, however, I have a problem. No matter what record the form was on, it always writes the primary key of the very first record.
Can anyone shed some light on this?
I have a form that I use for navigation in my database. It consists of links to the left to swith between forms, and a subform in the middle. When a link to the left is clicked, I run code to switch the source fo the subform:
Code:
me.subfrmFrame.SourceObject = "frmSubCustodian"
I want the form to "remember" the last record the user was on, so I created a table and am writing the primary key of the form to the table on the form's unload event. Then, on the form's load event, I'm looking up that key from the table.
When I open and close the form by itself, not as a subform of my navigation form, everything works fine.
When I open the form from the navigation screen, everything is fine.
When I switch to another form on the navigation screen, however, I have a problem. No matter what record the form was on, it always writes the primary key of the very first record.
Can anyone shed some light on this?