run button in private sub

Bilal

Registered User.
Local time
Today, 00:52
Joined
Sep 30, 2013
Messages
64
i want to run btnLast in "Private Sub Form_Open" that way, when i open my form it wont display my first record, rather my last
can anyone please help me with the syntax :)
 
Perhaps I'm missing your intent, but why don't you sort the form's recordsource the way you want?
 
Perhaps I'm missing your intent, but why don't you sort the form's recordsource the way you want?
okay i think i confused you, basically when i open up my form it always shows the first record, then if i want to see the last record i have to use my buttons to flip through all my records until i get to the last one, however i want the user to be able to see the last record immediately as soon as the form is opened,
:)
 
On the Form open employ DoCmd.GoToRecord method.. with acLast as the record argument.

Caution ! if the recordset is big, the load will take longer/slower.
 

Users who are viewing this thread

Back
Top Bottom