After Update: Go to new record

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello.
I have form with a subform. On my subform object I have an Event Procedure
on "After Update". The Event Procedure has this:

Private Sub Form_AfterUpdate()
Me.Requery

End Sub

This Event Procedure basically refreshes the subform after I edit a record.
The problem I have with it is after I update a record, the records refresh
but my cursor gets moved all the way to the first record in the subform. I
would like my cursor to go to a new record in the subform instead.

I have tried but I get a compile error:

Private Sub Form_AfterUpdate()
Me.Requery
Me.NewRecord

End Sub

Would you know how to modify the Event Procedure to take me to a new record
after requerying the subform?

Iram/mcp
 
GREAT Maurice!

It is working for me too: add new record to 2nd subform...

Form.SetFocus & DoCmd.GoToRecord , , acNewRec is not working - try it! Just
need to use "If Then" becuse it is not working if you do not have any record
on a subform.

Thanks,
Steve,
Hungary
 
Back
Top