Thanks for the inspiration. It works now the way I wanted and here's what there is.
A brief description of variables is in a previous post (look for pictures).
The Current event of the form A
Code:
Private Sub Form_Current()
intCurrent = Forms!A.CurrentRecord
intTotalRecordCount = IIf(IsNull(DCount("[id]", "A")), 0, DCount("[id]", "A"))
Forms!A.btnNext.Enabled = (intCurrent < intTotalRecordCount)
Forms!A.btnPrev.Enabled = (intCurrent > 1)
End Sub
The Current event of the subform B embedded within the A form:
Code:
Private Sub Form_Current()
aId = Forms!A.id
intCurrent = Forms!A.subformB.Form.CurrentRecord
intTotalRecordCount = DCount("[id]", "B", "a_id = " & aId)
intTotalRecordCount = IIf(IsNull(intTotalRecordCount), 0, intTotalRecordCount)
Forms!A.subformB.Form.btnNext.Enabled = (intCurrent < intTotalRecordCount)
Forms!A.subformB.Form.btnPrev.Enabled = (intCurrent > 1)
End Sub
All working OK. I'm not doing anything in the button events, just in the Current event.