Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Formula needed for labels 1

Status
Not open for further replies.

djmtek

Technical User
Mar 29, 2003
13
CA
Is there a way I can correlate the number of labels printed for each person in one table with a "quantity" field in another table?

I developed an access 2000 database for a city band to track its fruit sale. Now they would like to print off one ballot for every two boxes of fruit each student has sold. (there will be prizes).
Applicable Tables:
Students - contains names of sellers. Not all have sold.
Orders - contains studentid, orderid, customerid, date
Orderdetails - contains the quantity field I want to reference.
Customers - probably not needed in this equation but fyo
Products - probably not needed in this equation but fyo

How can I create a report that will print one label for every two boxes a student has sold? [bigears]
 
faq703-3276

Look at this FAQ by CosmoKramer. It should do everything you need.

Paul
 
This was very helpful. What an ingenious way of doing labels! Thanks for the link. By the way, I did do a search of the archives but missed the posting above somehow. Now, any idea how I can exclude the top 5 sellers? I do have a query listing the top 5, but I want to exclude them from the label query.
 
SELECT Table.fld1, Table.fld2, Table.fld3
FROM Table
WHERE (((Table.fld1) Not In (Select Top 5 fld1 From Table)))
ORDER BY Table.fld1;

That should get you close.

Paul
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top