doDmd.FindRecord

  • Thread starter Thread starter Saffron
  • Start date Start date
S

Saffron

Is there a way I can show a message if the record searched for using
doDmd.FindRecord is not found?
 
Instead of FindRecord, do a FindFirst on the RecordsetClone of the form.

Example:
Dim rs As DAO.Recordset
Set rs = Me.RecordsetClone
rs.FindFirst "[Surname] = ""Smith"""
If rs.NoMatch Then
MsgBox "Not found"
Else
Me.Bookmark = rs.Bookmark
End If
Set rs = Nothing
 
Back
Top