Query to Collect Items from a Table In Priority Categorization (1 Viewer)

adewale4favour

Registered User.
Local time
Today, 10:24
Joined
Aug 9, 2019
Messages
45
Hey Guys,
I have a new challenge here. I actually have a table with list of items to be sold, but meant to be sold on priority i.e. a particular one must be exhausted before the next is visible for selection. This will mean to indicate a priority (a), (b), (c) etc. in a query.

Now how do I structure a select query to indicate only item (a) and when the (a) item is exhausted (ONLY when it is exhausted), then item (b) will be available for selection and so on.

I will really appreciate contributions that can help scale this out.

Michael
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 01:24
Joined
May 7, 2009
Messages
16,504
if this is your master table, and you have another table, transaction table:
you can have it as a combobox, the rowsource:

select Top 1 * from master where master.Qty < Nz(DSum("Qty", "TransactionTable", "itemCode = '" & [ItemCode] & "'"), 0)
 

adewale4favour

Registered User.
Local time
Today, 10:24
Joined
Aug 9, 2019
Messages
45
thanks a lot, but isn't there a way of handling this from the Select Query inserting a criteria to fetch records in a particular Order, without using a Combo? Even if I am to specify the order in the criteria as 1, 2, 3, 4 where 2-5 will not display except if 1 is no more?
 

Users who are viewing this thread

Top Bottom