S
Starry
My mainform lookup combo (cmbJobfind) finds a subform record based on
selection and works great until I click on a subform record then it stops
working but gives no error. If I change the mainform record the combo values
change (as they should) along with the records displayed in the subform but
the (cmbJobfind)still fails to do its job. Provided that I don't click on a
record it works fine regardless of any main form changes.
Code
Private Sub cmbJobfind_AfterUpdate()
Dim strJobnum As String
strJobnum = Me.cmbJobfind.Value
Me.Jobs.SetFocus
DoCmd.FindRecord strJobnum, acEntire, False, , False, acCurrent, True
'Me.SetFocus <just guessing that mainform needed focus but makes no
difference
End Sub
No doubt I'm just being a bit dim please show me where thanks.
selection and works great until I click on a subform record then it stops
working but gives no error. If I change the mainform record the combo values
change (as they should) along with the records displayed in the subform but
the (cmbJobfind)still fails to do its job. Provided that I don't click on a
record it works fine regardless of any main form changes.
Code
Private Sub cmbJobfind_AfterUpdate()
Dim strJobnum As String
strJobnum = Me.cmbJobfind.Value
Me.Jobs.SetFocus
DoCmd.FindRecord strJobnum, acEntire, False, , False, acCurrent, True
'Me.SetFocus <just guessing that mainform needed focus but makes no
difference
End Sub
No doubt I'm just being a bit dim please show me where thanks.