Find record in a subform

jeudi 26 février 2015

I have an unbound form: frm_ReceiptSearch with some fields that, when something is input, will search a datasheet viewed form on a subform on the main form (subform name is sf_frm_Receipts). Currently, on the txt_CheckNo field's after update event, I have the following code:



Private Sub txt_CheckNo_AfterUpdate()

Dim SrchVar As String



SrchVar = Me.txt_CheckNo



Me!sf_frm_Receipts!REFNO.SetFocus

DoCmd.FindRecord SrchVar, acEntire, , acSearchAll, , acCurrent, True

End Sub



but I'm getting a runtime error 438. Any suggestions?

Find record in a subform

0 commentaires:

Enregistrer un commentaire

Labels