Hi, I have what is probably a familiar set up. I have the following tables
Product
OrderLine
Orders
Customer
I cant post an image of the relationships at the moment due to my post count, but a Product can have one to many Orderlines. An Orderline can have many to one Orders. And Orders can have many to one Customers.
So each of these tables has data. The order table has a field which determines if an invoice has been dispatched. I need to place a button somewhere which when clicked, will get all orders which do not have an invoice dispatched so it can create an invoice for them.
So I have gone into Query Design, and added my tables and the data I need to display in the invoice. For the invoice dispatched, I have set the criteria to false.
The problem is, when I execute this query, it shows me all the rows in OrderLine which do not have an invoice dispatched. I just need it to show the orders which need an invoice dispatched, and not duplicate the orders which have more than one product in them.
So at the moment, because Order 1 has two products in it, Order 1 is being listed twice by my query. So is there any way to make the listings unique, or another way to do this?
I hope I have not made this too confusing, I was starting to get lost writing this!
Thanks
Product
OrderLine
Orders
Customer
I cant post an image of the relationships at the moment due to my post count, but a Product can have one to many Orderlines. An Orderline can have many to one Orders. And Orders can have many to one Customers.
So each of these tables has data. The order table has a field which determines if an invoice has been dispatched. I need to place a button somewhere which when clicked, will get all orders which do not have an invoice dispatched so it can create an invoice for them.
So I have gone into Query Design, and added my tables and the data I need to display in the invoice. For the invoice dispatched, I have set the criteria to false.
The problem is, when I execute this query, it shows me all the rows in OrderLine which do not have an invoice dispatched. I just need it to show the orders which need an invoice dispatched, and not duplicate the orders which have more than one product in them.
So at the moment, because Order 1 has two products in it, Order 1 is being listed twice by my query. So is there any way to make the listings unique, or another way to do this?
I hope I have not made this too confusing, I was starting to get lost writing this!
Thanks