Hi all, I'm unsure how to go about this and wondered if anyone might have an idea to get me started?
I have a customer sales database, and the owner would like to send out deliveries once there are 150 items ordered. The company sells compost, mulch etc for gardening so they are heavy bags and can only fit so many on a van.
So its tblCustomerPurchasedItems which holds the quantity of items ordered (in the 'Quantity' field. They would like it to add up and print once its reached 150 different items (not orders), so this might be 50 orders with 3 items each, or one order with 150 items, or anything really as long as the items total 150.
Here are the tables which hold this info:-
tblCustomerPurchases:-
PurchaseNumber (AutoNum PK)
CustomerNumber (Long Int, links to CustomerNumber in tblCustomers)
DateOfPurchase
TotalCost
tblCustomerPurchasedItems:-
PurchasedItemID (AutoNum PK)
PurchaseNumber (Long Int, links to PurchaseNumber in tblCustomerPurchases)
ProductID
Quantity
So as you can see tblCustomerPurchases holds date, cost and customer number of the purchase, and then tblCustomerPurchasedItems holds which Products were in the purchase and at what Quantity.
I know I am obviously going to have to count on the quantity field, but I dont know how to do it??
Also, some other things I have thought of... if the last order placed which reaches 150 items actually takes it over 150, e.g. 153 etc, obviously I don't want to cut this order/delivery in half.
And... they would like the option somewhere in a form to change the quantity needed from 150 to another number.
Also, there is a table and field which holds a Salesperson name. They would like the option to alternatively count 150 orders (or whatever is chosen) per salesperson and then print!!!
I don't know if that's just getting too complicated!
So I'm stuck, any ideas how I can begin to go about this?
Many many many thanks for any help!!

I have a customer sales database, and the owner would like to send out deliveries once there are 150 items ordered. The company sells compost, mulch etc for gardening so they are heavy bags and can only fit so many on a van.
So its tblCustomerPurchasedItems which holds the quantity of items ordered (in the 'Quantity' field. They would like it to add up and print once its reached 150 different items (not orders), so this might be 50 orders with 3 items each, or one order with 150 items, or anything really as long as the items total 150.
Here are the tables which hold this info:-
tblCustomerPurchases:-
PurchaseNumber (AutoNum PK)
CustomerNumber (Long Int, links to CustomerNumber in tblCustomers)
DateOfPurchase
TotalCost
tblCustomerPurchasedItems:-
PurchasedItemID (AutoNum PK)
PurchaseNumber (Long Int, links to PurchaseNumber in tblCustomerPurchases)
ProductID
Quantity
So as you can see tblCustomerPurchases holds date, cost and customer number of the purchase, and then tblCustomerPurchasedItems holds which Products were in the purchase and at what Quantity.
I know I am obviously going to have to count on the quantity field, but I dont know how to do it??
Also, some other things I have thought of... if the last order placed which reaches 150 items actually takes it over 150, e.g. 153 etc, obviously I don't want to cut this order/delivery in half.
And... they would like the option somewhere in a form to change the quantity needed from 150 to another number.
Also, there is a table and field which holds a Salesperson name. They would like the option to alternatively count 150 orders (or whatever is chosen) per salesperson and then print!!!
I don't know if that's just getting too complicated!
So I'm stuck, any ideas how I can begin to go about this?
Many many many thanks for any help!!

