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

Force a query to return a record???

Status
Not open for further replies.

GSMike

Programmer
Feb 7, 2001
143
US
Is there a way to force a query to return a record...such as as text data tag that says "no records returned" in the event that the query's recordset is empty?
I know there is a way via code in terms of using a recordset vs. a query and outputting the recordset to a text file, etc.
But I am wondering if there is a way within Access itself, using the GUI interface.
Thanks for your help and ideas.
-Mike Mike Kemp
kempm541145@yahoo.com
 
Hiya Mike,

What you need to do is use an outer join and an ISNULL command:

SELECT ISNULL(A.name,'There is no birthday that day')
FROM NAME a,
BIRTHDAYS b
WHERE a.empno *= b.empno
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top