Moving to a record

Howlsta

Vampire Slayer
Local time
Today, 07:58
Joined
Jul 18, 2001
Messages
180
In my code I'm adding in extra data to my tables with an export program. I'm storing the last value for the primary key in a public variable called AccKey then importing the new data to the table. How can I find the value of AccKey later on and move back to that record. I've been trying Seek but I haven't used the method before and am having problems.

Help would be greatly appreciated,

cheers,

Rich
 
You could store the value of the last primary key in a specific table and then recall it from there.

Is your question "How do I re-open a form and have it showing the same record as when it was closed?

If so, I have some code to help you

Col
 
I'm storing the the last record for Accident Key like this:
m_rsAcc.MoveLast
lAccKey = m_rsAcc.Fields![Accident Key]

but then the code adds a load of new records. Later on in the code I want to move back to the record number stored in lAccKey. There are no forms involved in displaying any table info, it is a program to merge records, from Excel. Thanks
 

Users who are viewing this thread

Back
Top Bottom