Results 1 to 4 of 4
  1. #1
    3 Star Lounger
    Join Date
    Nov 2002
    Location
    South Carolina, USA
    Posts
    257
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Query design (Access 97)

    Hello,

    I have created a query to extract some data and make a table with this data. I need to take some of the data in the new table and change the contents. An example: class code of ATC to class code of IAGeneral for all the records.

    Is this possible in a query? I would like to perform this task all at one time.

    Thanks,
    Deborah

  2. #2
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,623
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: Query design (Access 97)

    Welcome back to the Lounge! Yes you can do that with what is called an Update query. Design a query based on your new table that selects all of the records with class code = "ATC" and test it to make sure you are getting what you want. Then change the query to an Update query and in the update to cell for the class code field, put the string "IAGeneral" - that should do the task. Also you can easily modify it if you want to change other entries. Post back if this doesn't quite make sense.
    Wendell

  3. #3
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Now-Luanda, Angola, Originally - Anna Bay, New South Wales, Australia
    Posts
    238
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Query design (Access 97)

    Is there a way to update the particular field from another table
    Dummy from Down Under <img src=/S/flags/Australia.gif border=0 alt=Australia width=30 height=18>

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

    Re: Query design (Access 97)

    If you want to update a field in TableA using a value from TableB, you must add TableB to the update query, and join it to TableA on an appropriate field (or fields). You can then set the Update To cell for the field from TableA to be updated to

    <tableB>![NameOfField]

    with the actual names substituted.

Posting Permissions

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