Go to last record when form opens?

voidcranium

Registered Something.
Local time
Today, 01:25
Joined
Oct 29, 2006
Messages
175
I would like my form to open and automatically go to the end of the records, so I don't have to navigate to the end before I start entering data.

I have seen a form do this but can't find out how.

Thanks
 
in the openevent try

application.runcommand accmdrecordsgotolast
 
in the on open property of your form click on the box with the three dots and choose code builder..

then paste this in

DoCmd.GoToRecord , , acNewRec

the other way to do this is to make the form DE entry only (found on the properties box) but it depends on your usage for the form.

John
 
if thats is vb6 then its simply

adodc1.recordset.addnew

that is if you are using ado control
 
Surely the most efficient way to achieve this is to have the controlsource sorted descending based on the primary key or autonumber so the last record in the table is the first one displayed on the form.
 
I don't think the OP's object is actually to go to the last record but, as others have suggested, to got to a new record.
 

Users who are viewing this thread

Back
Top Bottom