Results 1 to 4 of 4
  1. #1
    ser01 is offline Advanced Beginner
    Windows 7 Access 2007
    Join Date
    Feb 2010
    Posts
    64

    Update query to summarize multiple values


    Hi all!
    I need a little help with an update query. I have 2 tables involved in this. The table on the one side has a number of items in it. The table on the many side has amounts that i would like to summarize and put next the respective items in the table on the one side. I just cant figure out how to do this.
    I know that it is not a good idea to store calculated values. However there is more to this and i would appreciate if someone could help me find a solution...

  2. #2
    Datagopherdan is offline Competent Performer
    Windows 7 Access 2007
    Join Date
    Dec 2008
    Posts
    220
    Actually, it's very rare that you would need to store calculated values. I can only think of a few instances throughout my career where this was necessary. The most common being with backorders where historical data needed to be maintained for comparisons. Even in that though, the fields that were used to perform the calculations were not in the historical table. A good rule of thumb is if you have all the available fields to perform a calculation in a table then you should not be storing calculated results.

    Could you provide a little background on why you would need it setup like this? I don't want to give you answers that's going to lead to problems down the road, if you don't have your tables setup correctly.

  3. #3
    ser01 is offline Advanced Beginner
    Windows 7 Access 2007
    Join Date
    Feb 2010
    Posts
    64
    Thank you very much for your reply.
    So here is a little more information on what I am trying to accomplish. My company is using a separate system to manage our orders, inventory and accounts receivables. The access database that I created is being used to take orders from customers that are later being run through our main system. The access database has a table with inventory that is being imported from our main system (which is an ancient DOS system). The inventory is being imported on daily basis then is being adjusted in access with new orders that have been taken using the access database. I have written some code for the inventory calculations that subtracts what has been ordered from the numbers that have been imported. That all works well. At the beginning of each day all the previously entered orders in access are being cleared and the inventory gets reimported from our main system. The problem is that some of the orders entered in access are future orders and do not want to clear them. The solution that I thought of is to have dates next to the quantities ordered, use those dates as a criteria in the query that clears the orders. But to accomplish that I need to change the way the inventory is being calculated. I hope that this makes sense and that you could maybe help me find a solution. Thank you…

  4. #4
    ser01 is offline Advanced Beginner
    Windows 7 Access 2007
    Join Date
    Feb 2010
    Posts
    64
    Any sugestions?

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

Similar Threads

  1. Summarize on different columns and substract
    By mauro27 in forum Queries
    Replies: 3
    Last Post: 04-27-2010, 01:46 AM
  2. Replies: 1
    Last Post: 02-03-2010, 09:17 PM
  3. Multiple UPDATE in single query
    By nishezaman in forum Access
    Replies: 0
    Last Post: 12-13-2009, 01:40 AM
  4. query field with multiple values
    By mknowles in forum Queries
    Replies: 1
    Last Post: 11-24-2009, 11:31 AM
  5. Query multiple values in a field
    By JAYgarti in forum Access
    Replies: 0
    Last Post: 07-09-2009, 09:52 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