Results 1 to 2 of 2
  1. #1
    AdrianoG87 is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Sep 2011
    Posts
    8

    updating table using results of another query

    Hi All,

    I am trying to update 1 table using the results of a query that performs a sum from another table.

    i have a query that performs a sum of freight charges grouping by an invoice number

    the result of which is an invoice number and a total freight amount

    i have a table with invoice number and amount left blank

    once i have finished calculating my freight charges, i need a query that matches the invoice numbers and updates the blank amount field with the calculated amount

    and on top of that, i need the update to only run for the invoice number that is present on a form.

    i have hit a dead end, i get a "operation must use updateable query" i have no idea what this means either.

    any help would be great, no coding though, im a newbie.



    thanks all

  2. #2
    pdebaets is offline Competent Performer
    Windows Vista Access 2010 (version 14.0)
    Join Date
    Jul 2010
    Location
    Los Angeles
    Posts
    235
    I think updating is a bad idea in this case. I suggest you use a DSum to put the freight charges on the invoice form. Ex.: In your FreightCharges control ControlSource property put

    =DSum("MyFreightChargeAmountField", "MyFreightChargesTable", "InvoiceID = " & me!InvoiceID)

    (replace field, control and table names as needed)
    Last edited by pdebaets; 11-23-2011 at 11:25 PM. Reason: more info

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

Similar Threads

  1. Updating a Table from a second Query.
    By israellawndale in forum Access
    Replies: 4
    Last Post: 09-22-2011, 02:51 PM
  2. Writing Query Results to New Table
    By quigongrim in forum Queries
    Replies: 2
    Last Post: 08-23-2010, 09:04 AM
  3. Replies: 0
    Last Post: 02-24-2010, 12:56 AM
  4. Populate Table with query results
    By sparkyboy2406 in forum Queries
    Replies: 1
    Last Post: 02-23-2010, 03:51 PM
  5. Combine Query Results to One Table
    By pr4t3ek in forum Queries
    Replies: 0
    Last Post: 12-19-2008, 06: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