All, using access 2010. I have a main form with a combo box trying to search a subform. The combo box is named cboSSN and the recordsource is a qry that contains the SSNs. The parent and child links are SSN. I want to select a SSN from the combo and in the afterupdate; view the subform record. I used this code several times but for some reason doesnt work now.
Can anyone see what's wrong.
Code:
Dim strInvoice As String
'Look for the Invoice number in the Ship Info table based on the PRO number entered in the search box.
strInvoice = Nz(DLookup("SSN", "qryMaster", "SSN=""" & Me.cboSSN & """"), "")
If strfilter <> "" Then 'ssn number was found so reset the bookmark based on the returned Invoice number.
If Me.Dirty Then Me.Dirty = False
With Me.RecordsetClone
.FindFirst "SSN=""" & strfilter & """"
Me.Bookmark = .Bookmark
End With
Else 'SSN number was not found so display a message box
MsgBox "The SSN number you entered was not found."
End If
'Clear the search box.
Me.SSN = ""
Can anyone see what's wrong.