Access 2007 question

merc123

Senior Member
Been a while since I used databases (think 2002) and trying to figure this out.

I have a table that has order numbers, price, quantity and tax rate. I am breaking down the parts within the order so I may have 5 parts with the same order number and different prices/quantitys. I have a form that shows the info based off a query of said table. What I want to do is get a total dollar amount for the order number. Like this:

Order #: 1
Price: $5
Quantity: 1
Tax Rate: 7%

Order #: 1
Price: $2
Quantity: 2
Tax Rate: 7%

Order #: 1
Price $10
Quantity: 1
Tax Rate: 7%

Order #2
Price: $5
Quantity: 10
Tax Rate: 7%

The order total for order #1 should show $18.19 in the field "Total for Order" and not include Order #2. How would I do that.
 

wmahunter

Banned
I believe you will have to work with the "if" function and will start out like this =(IF(order #=1, etc.
 

merc123

Senior Member
I've come close with count() and countd(). I think countd() is the correct one but need to get my syntax right.
 

TripleG

Member
Order Number

Sorry I'm not clear on whether you want to display total on a form or a report? Either one could be generated with a query. You could set up a form to enter the desired order number or have it prompt you for the order # when you launch the report. I like to use a "Report Entry Form" where I enter things like start date, end date, vendor #, etc. Where the information is static, I set it up in a table to allow a pull down - including a table of reports. A query is launched with a button on the form and the various fields in the query are filled from the entries you made on the form. Hope this helps.
 
Top