Results 1 to 4 of 4
  1. #1
    ChipVerdi55 is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jun 2012
    Posts
    8

    Purchase Order Totals

    I have a Purchase Order form with a a subform that has POline item details (ProductID, Quantity, Unit Cost, and extended Cost (calculated). I want to sum the list of ExtendedCosts which are on a subform to display total PO cost. I also want that sum toupdate as I add line items.
    My PO main form is 90% similar to Northwinds Order DetailsForm which allows the user to add items to a Purchase Order. However Northwindsdoes not sum the extended costs to display the total Purchase Order costs.


    I have tried two things
    1. Ieither get a #error if I try to do the sum in a text box on the main form, or
    2. WhenI wrote a query to use on a second subform which had a single field whichdisplayed the PO total, I got the total costs but I can’t get the total toupdate either when a new line item extended costs are calculated or when I makea change in one of the PO Line Items. I tried the following with limitedsuccess
    Code:
     Private Sub Form_AfterUpdate()
    Code:
       Me.Parent!POTotalChild28.Form.Requery
    End Sub 

    Now the subform will update to thecorrect total if I change records or place focus on the main form. The user prefersto see the new total immediately.
    Any ideas?

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Is the subform in Datasheet or Continuous View?

    If Continuous view, try textboxes in Report footer with expressions to sum fields.

    If Datasheet view, open form (not in Design view), click the Totals button on ribbon. This will reveal a Totals row. Select the desired function under each field. Click Save button.

    Want to provide db for analysis? Follow instructions at bottom of my post.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    ChipVerdi55 is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jun 2012
    Posts
    8
    I followed your directions and summed the Extended Cost field. Thanks for that tip. However, after a change to either the quantity or cost fields in an individual record, I had to change records to get the total to recalculate.

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Yes, that is likely because data entry/edit is not committed until form closes, move to another record, or run code.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Purchase Order Template
    By kstewart in forum Access
    Replies: 3
    Last Post: 04-25-2012, 01:07 PM
  2. Purchase Order Report
    By jordanturner in forum Forms
    Replies: 1
    Last Post: 10-13-2010, 10:53 PM
  3. how to creat purchase order
    By arctushar@yahoo.com in forum Access
    Replies: 5
    Last Post: 10-07-2010, 08:14 PM
  4. Purchase Order Preview Problems
    By jordanturner in forum Forms
    Replies: 5
    Last Post: 10-03-2010, 10:10 AM
  5. Help With Purchase Order Form
    By SpeedyApocalypse in forum Forms
    Replies: 29
    Last Post: 04-09-2010, 07:06 PM

Tags for this Thread

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