# Thread: Conditional Calculated Control on Print (Access 2003 SP2)

1. ## Conditional Calculated Control on Print (Access 2003 SP2)

I need some ideas. I have a report that prints a Customs Form for international orders and it works fine. Sometimes an order needs 2 Customs forms and then I need the Price to be divided by 2. Currently it puts the whole sum twice, thus if an order costs \$100.00, with 2 Customs forms it actually shows it is a \$200.00 order.

Here is the SQL that gets the data to my Customs Form.
SELECT tblInternationalOrders.OrderID, tblInternationalOrders.CustomerID, tblInternationalOrders.ShipFirstName, tblInternationalOrders.ShipLastName, tblInternationalOrders.ShipCareOf, tblInternationalOrders.ShipAddress, tblInternationalOrders.ShipCity, tblInternationalOrders.ShipState, tblInternationalOrders.ShipPostalCode, tblInternationalOrders.ShipCountry, tblInternationalOrders.CustomsForms, qryCustomsForms.Price AS [Printed Matter] FROM qryCustomsForms LEFT JOIN tblInternationalOrders ON qryCustomsForms.OrderID=tblInternationalOrders.Ord erID;

2. ## Re: Conditional Calculated Control on Print (Access 2003 SP2)

What does qryCustomsForms do?

3. ## Re: Conditional Calculated Control on Print (Access 2003 SP2)

SELECT tblInternationalOrderDetails.OrderID, Sum([Quantity]*[PricePerUnit]) AS Price
FROM tblProducts INNER JOIN tblInternationalOrderDetails ON tblProducts.ProductID = tblInternationalOrderDetails.ProductID
GROUP BY tblInternationalOrderDetails.OrderID;

4. ## Re: Conditional Calculated Control on Print (Access 2003 SP2)

And where would I see whether there are 1 or 2 customs forms?

5. ## Re: Conditional Calculated Control on Print (Access 2003 SP2)

frmInternationalOrders.txtCustomsForms

That is a number stored in tblInternationalOrders.

6. ## Re: Conditional Calculated Control on Print (Access 2003 SP2)

I'm afraid this doesn't give me enough information. Could you post a stripped down copy of your database? See <post#=401925>post 401925</post#> for instructions.

7. ## Re: Conditional Calculated Control on Print (Access 2003 SP2)

It's checking out time for me, I'll have to do it next week. Thanks for now.

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•