Controlling subform record from mainform

  • Thread starter Thread starter Paul Byford
  • Start date Start date
P

Paul Byford

I would like to add record navigation buttons to my
mainform that will show next or previous record on the
attached subform. Any ideas? Cheers
 
Try this:
DoCmd.GoToRecord , Me.SubFormName.Form.Name, acNext
DoCmd.GoToRecord , Me.SubFormName.Form.Name, acPrevious
DoCmd.GoToRecord , Me.SubFormName.Form.Name, acFirst
DoCmd.GoToRecord , Me.SubFormName.Form.Name, acLast
DoCmd.GoToRecord , Me.SubFormName.Form.Name, acNewRec
replace SubformName with the name of the SubForm Control and not the name of
the subform it holds.
HTH
Bill
 
Back
Top