Hi,
I have the following code on an unbound form, on the lost focus of a combo box. This works fine the first time the db is opened and user does a search. Pull down works, goes to correct record on the staff form, but if you go back to the find form to do another search, the combo box no longer will let the user make a choice. A Error 2498 generates. Code follows. Any ideas?
Private Sub cmboStaff_LostFocus()
Dim i
i = Forms!frmfind!cmboStaff.Value
DoCmd.GoToRecord acDataForm, "frmStaff", acGoTo, i
End Sub
I have the following code on an unbound form, on the lost focus of a combo box. This works fine the first time the db is opened and user does a search. Pull down works, goes to correct record on the staff form, but if you go back to the find form to do another search, the combo box no longer will let the user make a choice. A Error 2498 generates. Code follows. Any ideas?
Private Sub cmboStaff_LostFocus()
Dim i
i = Forms!frmfind!cmboStaff.Value
DoCmd.GoToRecord acDataForm, "frmStaff", acGoTo, i
End Sub