Results 1 to 7 of 7
  1. #1
    3 Star Lounger
    Join Date
    Feb 2004
    Location
    Moundridge, Kansas, USA
    Posts
    342
    Thanks
    1
    Thanked 0 Times in 0 Posts

    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. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

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

    What does qryCustomsForms do?

  3. #3
    3 Star Lounger
    Join Date
    Feb 2004
    Location
    Moundridge, Kansas, USA
    Posts
    342
    Thanks
    1
    Thanked 0 Times in 0 Posts

    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. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

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

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

  5. #5
    3 Star Lounger
    Join Date
    Feb 2004
    Location
    Moundridge, Kansas, USA
    Posts
    342
    Thanks
    1
    Thanked 0 Times in 0 Posts

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

    frmInternationalOrders.txtCustomsForms

    That is a number stored in tblInternationalOrders.

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    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. #7
    3 Star Lounger
    Join Date
    Feb 2004
    Location
    Moundridge, Kansas, USA
    Posts
    342
    Thanks
    1
    Thanked 0 Times in 0 Posts

    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
  •