We have a query that extracts the SKU and qty of products that we sell daily. This query is used to create a csv file that we send to our supplier's EDI system to re-order those products. The query takes its data from a table that is overwritten every day; this table contains all of that day's sales.
What I need is to be able to get this query to break the daily re-order down into batches of say £130. When this point is reached, the query will stop and then run another one until the next £130 is reached, and so - on. At each stop, the query will need to delete the records that are in the query.
If necessary, I can build a Make-table query that will hold the whole day's order from which the query can delete the records mentioned above.
The query itself only contains 3 fileds, SKU, SumQty and Line Price (ie tot price of each SKU*Qty).
Is it possible to do such a thing? As mentioned in previous posts, I'm not very good at programming from theory, so if someone could do an example query, I'd be most grateful. I've attached a sampl db that contains the relevant stuff.
Thanks in advance for any help!
Mike