Finding newest record after requery

mark8569

New member
Local time
Today, 03:28
Joined
Aug 3, 2007
Messages
5
Hello,

I have looked for ages for a solution to this and have not yet found one to suit me so here I am.

I am creating an Access 97 db in which I have a form (section1) which shows its records in datasheet format(results from a query). On this form is a button which opens another form (fileViewNewSec1) where the user can input the data for a new record. In the closeEvent() part of this form I have put:

=[Forms]![section1].[Requery]

This successfully refreshes the form and the new record can be found. However, there are many records in this database and it would be nice if once the form (section1) has been refreshed that it would focus on the newly created record. I am not sure if anyone can help me with this.

The records are sorted by "fileRef" and therefore the newly created record is not placed at the bottom of the records. They do however have an auto number primary key, I am not sure this will be useful but they you go.

Cheers

MArk
 
One way to go is to find the max of Autonumber (which will be the last record entered) and goto that record.
 
Yeah I thought that might be a way to do it but how can I find the max of Auto number?
 

Users who are viewing this thread

Back
Top Bottom