FindFirst

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I use the following line to locate a recordset in my tabl

rs.FindFirst "[Project Number] = '" & ProjNum & "'

I would like to generate a message to the user if it can't find that specific record. How is this done

Daniel
 
If rs.NoMatch Then
MsgBox "Not found"
End If

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.
Daniel P said:
I use the following line to locate a recordset in my table

rs.FindFirst "[Project Number] = '" & ProjNum & "'"

I would like to generate a message to the user if it can't find that
specific record. How is this done?
 
Daniel P said:
I use the following line to locate a recordset in my table

rs.FindFirst "[Project Number] = '" & ProjNum & "'"

I would like to generate a message to the user if it can't find that
specific record. How is this done?

'immediately below the FindFirst line
if not rs.nomatch then 'match found
'do something with matching record
else
msgbox("Some text here")
end if

HTH,
Jeff
 
Back
Top