Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

run time error 2001

Status
Not open for further replies.

ggreg

Programmer
Joined
Mar 9, 2001
Messages
201
Location
US
I have the following code in the click event of a button
on a form:


If Nz(DCount("*", "qrySearchName"), 0) < 1 Then
MsgBox "record not found"
Exit Sub
Else
DoCmd.OpenQuery "qrySearchName"
End If

The query has this:

in one of the field area I have this

[tblmusic]![First_Name] & " " & [tblmusic]![Last_Name]

then in the critria I have:
Like "*" & [First And/Or Last Name] & "*"

How can I get a message box to come up if My query turns out null telling me their is no value?








 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top