How do I change records using an update query?

G

Guest

I have a table that has three fields: Product ID, Product Model, and Category
I need to update hundreds of records with the correct Category, based on a
range of Product Model (part numbers).
I have been able to select the range using between "aa" and "zz" to identify
the Product Model to use for the comparison, but can not figure out how to
use an update query to change the values in the Category field to a specific
value.
What is the correct syntax? I am NOT an Access programmer and need to use
the simplest method possible.
Examples of the appropriate syntax would be very helpful.
 
G

Guest

Hi
Create a new query. Click on the 'query type' option and select Update
Query.
The only fields you'll need are Product Model (for the criteria) and
Category (which is the field you want to update).
In the criteria section, under Product Model, enter the criteria you want to
use. In the 'update to' field under Category, enter what you would like the
field to be updated to.
Take a copy of your data/database before you start!
 
J

Jeff Boyce

#1 -- BACKUP your .mdb file!

Rather than syntax, consider using the built-in query design tool.

Create a new query. Add your table.

Select the ProductModel and Category fields in the lower "grid".

Set your criteria for ProductModel.

Run the query -- do you get the rows you want to change?

Now modify the query design. In design mode, on the menu bar, select
<Query> and set it to Update.

In the "grid" there should now be an Update To row. Put the new value in
under Category. Run it.

Good luck

Jeff Boyce
<Access MVP>
 
G

Guest

Andy,

THANK YOU. That immediately resolved the issue. It's great to have
experienced help for a rookie like me.

Again, THANK YOU!!!

Henry
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top