GoToRecord in subform

G

Guest

I have the following line to go to the next record in my subform
DoCmd.GoToRecord acDataForm, "frmRqsts!frmRqstsSubform", acNext

but am having an runtime error 2489 the object
'frmRqsts!frmRqstsSubform",acnext isn't open

Anyw help on how to take care of this?
(background: Combobox on my subform has yes/No, if no is selected, then
what I want to do is go to the next record)
 
B

Brian Bastl

The code belongs in the AfterUpdate event of the combo box in your subform.

'to move to the next record in the subform

If Me.ActiveControl = "No" Then
DoCmd.GoToRecord , , acNext
End If

HTH,
Brian
 

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

Similar Threads


Top