yes correct I want to get the minimum values from the quantities which are greater than the length
Desciption Length Quantity (nearest possible or equal)
I have come up with this but it is still wrong, it still gives me the quantity that have been used up already. Quantity allocated already for a Length should be counted out from the list.
I am making something like a cutting plan, where I want to allocate the excess material that was cut from a previous allocation.
example if I have 10 meters for each LENGTH, and initially I have used or cut 6 meters from the initial cutting, I want to allocate or reuse the remaining 4 meters to other requirement requiring equal or less than 4 meter
SELECT TblNeed.Description, TblNeeded.ShtNo, TblNeed.Length, DMin("[Excess1]","TblCut","[Excess1] >=" & [Length]) AS Alloc
ORDER BY TblNeed.Description;
Sorry I have a hard time understanding english since I am not a native speaker of english. I hope I answered your question correctly.