I have a search text box, how can i create a message box to tell the user that entries in the text box does not match any record in the table.
I have a search text box, how can i create a message box to tell the user that entries in the text box does not match any record in the table.
I'd suggest looking at the DCount function.
If Dcount(..) = 0 Then
Msgbox "No such record"
else
'''''whatever you want to do with found records''''
end if
see http://www.techonthenet.com/access/f...ain/dcount.php
If you are using a search/find function, you could use the NoMatch
from allen browne's site
Code:rs.FindFirst "City = ""New York""" If Not rs.NoMatch Then 'It's okay to keep processing. End If
what should be in (..) in the Dcount
You're going to have to tell us more of the table , the text box and the search.
Did you look at the examples atI have a search text box, how can i create a message box to tell the user that entries in the text box does not match any record in the table.
http://www.techonthenet.com/access/f...ain/dcount.php