Open form to show last (newest) record

G

Guest

My job records have a unique Ref that is dished out by DMax whenever a new
one is created. This works fine, and we can use a combo to find the
particular record that we want, by Ref.
However, whenever we open a job form it defaults to the first record.
How can I make it go to the last (newest) record i.e. the highest Ref,
instead?
Many thanks
CW
 
P

Peter Hibbs

CW

In the form's Form_Load event enter the following code.

DoCmd.GoToRecord , , acLast

This assumes that the records are sorted on the unique Ref field.

HTH

Peter Hibbs.
 
G

Guest

Thanks Peter, that does the job nicely!

Peter Hibbs said:
CW

In the form's Form_Load event enter the following code.

DoCmd.GoToRecord , , acLast

This assumes that the records are sorted on the unique Ref field.

HTH

Peter Hibbs.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top