doDmd.FindRecord

S

Saffron

Is there a way I can show a message if the record searched for using
doDmd.FindRecord is not found?
 
A

Allen Browne

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top