Results 1 to 2 of 2
  1. #1
    5 Star Lounger
    Join Date
    Jan 2001
    Posts
    1,119
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Update query (2003)

    I have this query that identifies records that I want to update in another table.
    The fields in this query are:
    Size Category
    Adj Size Categor
    Region
    County

    I take this query and join it to the table where I want to update two fields - "Contracts for Adj Size" and "Contracts for Sized Category"
    All the fields above I join to like fields in the table I want to update. This identifies 50 or so records.
    The "contracts for Adj Size" and "Contracts for Sized Categor" have a total for each County
    I have the following in the county field once I run the query.
    Allegheny
    Allegheny
    Beaufort
    Bedfort
    Lehigh
    Lehigh
    Lehigh

    What I would like to do is add 1 to "Contracts for Adj Size" and "Contracts for Size Category" for each Countys total. Since there are 4 Lehighs then the fields would increase by 4 for the Lehigh "Contracts for Adj Size" total and "Contracts for Size Category" total. Adding 1 to each county total for each time the county appears.

    How would I set up an update query to do this and is it possible.

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

    Re: Update query (2003)

    I can't really visualize the situation, but it seems to me that the counts are calculated numbers that shouldn't be stored in a table. They can easily be calculated on the fly in a query.

    If I misunderstood you (which is quite possible), please provide more information about the tables involved, or attach a stripped down and zipped copy of your database. <post#=401925>post 401925</post#> for instructions.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •