By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,483 Members | 1,574 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,483 IT Pros & Developers. It's quick & easy.

How to change fields automatically?

P: n/a
All,
In excel, when you find a field within a spreadsheet is wrong, and
every row needs to be changed, you simply change one cell, copy that
cell, and select all the rest of the cell, and paste it. In word, you
can just replace... in Access, how do we change fields in a table?
especially if it is a check box. Say, I want all the [MeetCriteria?]
field to be yes for a selected (or even all) records. How to
accomplish this easier than export all these to excel and bring it
back? Thanks.

Perry

Jun 12 '07 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Hi Perry,

you can use an Update query to update the desired records. Go to the
Query tab and click on New/Design. In the design window select your
desired table. In the Menu bar at the top of the Query Design Window
(the first Menu Bar that contains File, Edit, View,...) , go to the
Query menu and select "Update Query". Now go back to your table in the
Query Design view, scroll to your field that you want to update and
double click that field. This will place the field name in the "Field"
cell in the grid below. This is the field you want to update. In the
"Update To" cell enter the value you want to update the field to. For
Yes/No fields just enter True for yes and False for No. Then, in the
"Criteria:" cell below that you need to enter the criteria for the query
to use so that you update only the desired rows. If you want to update
all the rows to the same value, just leave Criteria blank. But if you
want to update only specific rows, then enter something like
yourTableName.SomeField = 'something"

Criteria: ExcelTable.FirstName = 'Joe'

This tells the query to only update your Yes/No field to True for rows
where the FirstName = 'Joe'. Note that I delimit the text 'Joe' with
single quotes. You have to delimit Text with single quotes. Numeric
values do not require delimiting. Date values in Access are delimited
by the # Pound symbol.

HTH

Rich

*** Sent via Developersdex http://www.developersdex.com ***
Jun 12 '07 #2

P: n/a
On Jun 12, 10:49 am, perry...@yahoo.com wrote:
All,
In excel, when you find a field within a spreadsheet is wrong, and
every row needs to be changed, you simply change one cell, copy that
cell, and select all the rest of the cell, and paste it. In word, you
can just replace... in Access, how do we change fields in a table?
especially if it is a check box. Say, I want all the [MeetCriteria?]
field to be yes for a selected (or even all) records. How to
accomplish this easier than export all these to excel and bring it
back? Thanks.

Perry
Go into query builder and basically do the same thing as you do in
Excel. Grab the table in question. Make this an update query. Drag
the field(s) you want to change and (if they are different) the fields
you want to use as the criteria for applying the changes into the
grid. Filter on the change criteria and add in the new value. Then
run the query.

Jun 12 '07 #3

P: n/a
Rich & Dave,
Thank you folks. I've never used this function before. Ok, it
is that easy... silly me. Thanks again.

Perry

Jun 12 '07 #4

This discussion thread is closed

Replies have been disabled for this discussion.