Basic Question

radicalrik

Registered User.
Local time
Today, 16:19
Joined
Apr 23, 2004
Messages
23
When I open a form it goes to the first record of the table. I would like it to go to the last record. How would I do that?
 
radicalrik said:
When I open a form it goes to the first record of the table. I would like it to go to the last record.

Do you mean the last in the table or do you actually mean a new record?
 
on the open event:

Code:
Private Sub Form_Open(Cancel As Integer)

Docmd.GoToRecord , , acLast

End Sub
 
Depends how you are opening the form.

  • Simply clicking on it

    Then, select the Form's properties and find the Form_Load event. Select the button at the right with the three dots and select Code Builder. In this window that opens type: DoCmd.GotoRecord, , acNewRec
  • By using a macro

    With the Data Mode property of the OpenForm method, select Add
 

Users who are viewing this thread

Back
Top Bottom