Controlling subform record from mainform

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
 
B

Bill

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top