so im using the dlookup function.
i have a form, and i would like to update the field "paID" when user fills out the "PrNum" field.
this is what i have.. im getting a mistype match.
so user types in the prnum, i want access to look up the tbl1_PurchaseRequisition and find the "PaID" which has the same prNum.
Private Sub Prnum_AfterUpdate()
Dim varpaID As Variant
Me.paID = DLookup("paid", "tbl1_PurchaseRequisition", "Prnum = '" & Me![Prnum] & "'")
Me.paID.Requery
End Sub
i have a form, and i would like to update the field "paID" when user fills out the "PrNum" field.
this is what i have.. im getting a mistype match.
so user types in the prnum, i want access to look up the tbl1_PurchaseRequisition and find the "PaID" which has the same prNum.
Private Sub Prnum_AfterUpdate()
Dim varpaID As Variant
Me.paID = DLookup("paid", "tbl1_PurchaseRequisition", "Prnum = '" & Me![Prnum] & "'")
Me.paID.Requery
End Sub