Results 1 to 4 of 4
  1. #1
    Wrangler is offline Wrangler
    Windows 7 Access 2007
    Join Date
    Dec 2005
    Location
    Alabama
    Posts
    17

    Added items in a column.

    I am trying to get the total for all the items in a column. I am working on an invoice database. In the extended Orders Details Query I have an Column that is ExtendedUnitPrice: IIf([Status]=1,[Order Details].UnitPrice*[Quantity],0). This allows for the invoice to show items order but not calculated in totals.



    My problem is now I can not total the ExtendedUnitPrice; I have used Sum(ExtendedUnitPrice) and get an error. I have also tried =Sum([Orders Subform].Form!ExtendedPrice) and still get an error. Can anyone tellme how I can total a column.

    Thanks

  2. #2
    Join Date
    Dec 2005
    Location
    Wilmington, DE - USA
    Posts
    275
    How is your form set up? I.e., main form with subform for order details? One main form in continuous view? Something else?

  3. #3
    Wrangler is offline Wrangler
    Windows 7 Access 2007
    Join Date
    Dec 2005
    Location
    Alabama
    Posts
    17
    the orders details is a subform.

  4. #4
    Join Date
    Dec 2005
    Location
    Wilmington, DE - USA
    Posts
    275
    Assuming that the sum is shown on the main form, use this control source in an unbound textbox:


    =(SELECT Sum(Quantity * UnitPrice) FROM OrderDetail WHERE OrderID = Forms!MainFormName!OrderID)


    Change the names of forms, tables, and fields as needed.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. individual records in same column on form
    By Sharron in forum Forms
    Replies: 0
    Last Post: 10-04-2008, 09:05 PM
  2. centre justify column text
    By marky in forum Access
    Replies: 0
    Last Post: 09-01-2008, 12:02 PM
  3. Replies: 1
    Last Post: 11-11-2006, 08:23 PM
  4. inserting values in column based another column
    By wasim_sono in forum Database Design
    Replies: 1
    Last Post: 06-27-2006, 05:23 AM
  5. 2 different fields into 1 column by query?
    By rainxking in forum Queries
    Replies: 1
    Last Post: 06-04-2006, 09:37 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums