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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

If the result of SELECT is nothing print "Not Found" 1

Status
Not open for further replies.

kia70

Programmer
Dec 28, 2006
4
CA
A newbie question:
Sometimes the result of SELECT might be empty/null. Instead of printing nothing I want to:
If Empty/Null Print "NOT FOUND"

Any clue... Thanx
 
Something like this ?
Code:
SELECT IIf(Trim(yourField & '')='','NOT FOUND',yourField) As myResult

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top