Go To Newest Record

branston

Registered User.
Local time
Today, 11:15
Joined
Apr 29, 2009
Messages
372
Hello!
I think im in the right place - apologies if not.
I have a button on a form in access and when i press it ive set it to create a new record then run some queries. I then want it to go to the newly created record. I was thinking something along the lines of docmd.gotorecord but the options under there only let you select last/first/previous etc.

any ideas to try would be greatly appreciated. Im new to vba so the simpler the better!

Thank you
 
if you want to use the GOTO option, have the dataset sorted first, oldest to newest, then use the LAST option.
 
I need to get my daughter the artist involved. She'd be able to dress it up. Sadly, she's about 10,000 miles away, and uber-busy.
 
Yes, as the one of the definitions of uber is:

to an extreme or excessive degree
 
Morning! Thanks for all your help so far... Ajetrumpet... to sort the data oldest to newest, how would i do that? Would i have to add a date when the record is created or is there some fancy code way to do it?!
 
If you have included a primary key field, let's say "ID", in the table with the AutoNumber data type, the latest record created will have the largest ID number
 
I was afraid that would be the case - i didnt really want to have to add another field, but if thats the easiest way of doing it so be it! Thank you for all your help!
 
You could pass the primary key of the newly created record to some variable then use find.
 

Users who are viewing this thread

Back
Top Bottom