Hi,
I have the following code which should return "No entry found" if there was nothing found. But instead I am getting default ms access error message.
Although the code works on numeric searches, it just doesn't want to work on string searches.
Is there anything I can or check to find out why it doesn't work.
Code:
Private Sub Combo96_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object
If Len(Combo96 & "") > 0 Then
Set rs = Me.Recordset.Clone
rs.FindFirst "[sdutentId] = " & Str(Nz(Me![Combo96], 0))
If rs.NoMatch Then
MsgBox "No entry found"
Else
Me.Bookmark = rs.Bookmark
End If
Set rs = Nothing
DoCmd.GoToControl "Combo96"
End If
End Sub