Sorry for the late reply, it being Christmas Eve we got to have the day off. Jebry has the right idea for running your query. That will show your products by the oldest date. Now I got to thinking about the setup that I initially advised of, and how to make it work right for you, well I came up with this:
1) For your Products you would want to query only records that have more than 0 in stock. That way when you run out of a certain stock it will just show stock more than zero ordered by oldest receiving date. Also it should have a running total of all your stock of the product ID only to show you how much you have total and not just one day.
2) Your In Stock table/subform will be responsible for showing how much you have received for a certain day and should have these fields among anything else that you need:
a. Receiving date
b. Total stock received(On Hand)
c. Stock on Order(Going Out)(count from On Order/Out Stock table/subform)
3) Your Out Stock or Ordered table/subform will be linked to your In Stock Table/subform so that you may keep a running total of what has been ordered from that stockpile of product. Viable fields for this table/subform would be related to each individual order for product, quantity going out and who got the product:
a. Date order placed
b. Quantity ordered
c. Company getting the order
Now your relationship for this should allow for a Main --> Sub --> Sub form format (arrowhead being the many side of the relationship. Your calculation will come into play when the sub sub form Ordered shows a running total of the quantity. This quantity should be referenced by Subform In Stock so that you can make a calculation on that form that will take away Ordered quantity from the In Stock quantity. That new result(Currently On Hand) will be tallied and referenced in the Main form(Products) so that you have a working register of whats going in and whats going out. But thats just how I see it working together cohesively as one unit. Let me know what you think.
If I take a peek in your Windows, to fix a problem, does that make me a "Peeping Tom"? Hmmmmmmmmmmv
![[pc1] [pc1] [pc1]](/data/assets/smilies/pc1.gif)
![[shocked] [shocked] [shocked]](/data/assets/smilies/shocked.gif)