G
George
About 8 years ago when I last used Access 97 I wanted to be able to store
the key fields (autonumber/long integer) into a table which could be read
again after startup. This would restore the user to the place on a form
where he left off in a prior session.
When frmMain first opens after the ap is started all fields are blank.
frmMain has these relevant controls:
frmMain!cboSection - SectionID (PK)
frmMain!txtQuestion - QuestionID (PK)
etc.
tblStoredValues
field 1 = StoredValueID (Autonumber)
field 2 = ControlName (Text)
field 3 = ControlValue (FK)
I remember setting up a table which contained the control name and would be
updated with the PK value each time the user moved off the control. But I
forgot how I stored the PK value. A line of SQL code in the after update
event maybe. When each form opened it looked up the values of these fields
and set the control to the saved value. Maybe I used DLookup. Need an
example of what goes where. Thanks.
the key fields (autonumber/long integer) into a table which could be read
again after startup. This would restore the user to the place on a form
where he left off in a prior session.
When frmMain first opens after the ap is started all fields are blank.
frmMain has these relevant controls:
frmMain!cboSection - SectionID (PK)
frmMain!txtQuestion - QuestionID (PK)
etc.
tblStoredValues
field 1 = StoredValueID (Autonumber)
field 2 = ControlName (Text)
field 3 = ControlValue (FK)
I remember setting up a table which contained the control name and would be
updated with the PK value each time the user moved off the control. But I
forgot how I stored the PK value. A line of SQL code in the after update
event maybe. When each form opened it looked up the values of these fields
and set the control to the saved value. Maybe I used DLookup. Need an
example of what goes where. Thanks.