422,538 Members | 2,075 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 422,538 IT Pros & Developers. It's quick & easy.

Message to show on customers with no orders on Access

P: 4
Hello! I am doing a continuous report based on customers and the orders they have placed. I have to include all customers whether or not they have placed orders. I also have to include a message saying that the customer placed no orders. I've been struggling with this concept. How do I include the message? Thanks!
1 Week Ago #1

✓ answered by NeoPa

You start with a query where your customer table is linked with a LEFT JOIN to your orders table. A LEFT JOIN will mean that all fields from the orders table are represented as Null.

Now comes the easy part. Use Nz() to show either the linked value if it exists, or the message if the value is Null.

Share this Question
Share on Google+
3 Replies


NeoPa
Expert Mod 15k+
P: 30,680
You start with a query where your customer table is linked with a LEFT JOIN to your orders table. A LEFT JOIN will mean that all fields from the orders table are represented as Null.

Now comes the easy part. Use Nz() to show either the linked value if it exists, or the message if the value is Null.
1 Week Ago #2

P: 4
It worked! Thank you so much!
1 Week Ago #3

NeoPa
Expert Mod 15k+
P: 30,680
It's a pleasure to help where I can :-)
1 Week Ago #4

Post your reply

Sign in to post your reply or Sign up for a free account.