mytaurus2000
Technical User
I have a combo box, that if a user types in SSN then it goes to that record, here is the code
Private Sub cmbSSN_AfterUpdate()
' Find the record that matches the control.
Dim rs As DAO.Recordset
Set rs = Me.RecordsetClone
rs.FindFirst "[SSN] = '" & Me![cmbSSN] & "'"
If Not rs.EOF Then
Me.Bookmark = rs.Bookmark
Else
DoCmd.RunCommand acCmdRecordsGoToNew
Me!SSN = Me!cmbSSN
Me!cmbSSN.SetFocus
End If
Me!cmbSSN.Value = ""
End Sub
But when you type in the record, nothing happens. Any ideas?
Private Sub cmbSSN_AfterUpdate()
' Find the record that matches the control.
Dim rs As DAO.Recordset
Set rs = Me.RecordsetClone
rs.FindFirst "[SSN] = '" & Me![cmbSSN] & "'"
If Not rs.EOF Then
Me.Bookmark = rs.Bookmark
Else
DoCmd.RunCommand acCmdRecordsGoToNew
Me!SSN = Me!cmbSSN
Me!cmbSSN.SetFocus
End If
Me!cmbSSN.Value = ""
End Sub
But when you type in the record, nothing happens. Any ideas?