How do you add repeated data to pre-existing records in table?

O

OBBN

I have to fill one field with new data,the name "DESC",
repeatedly for over 2000 records. Can this be done automatically?
I have been doing this manually using the copy/paste function in datasheet
view which is quite time consuming. There are other names used in this
datasheet
so I want to avoid overwritting them by only adding "DESC" to
a select group of records.

Thanks in advance for your help

PS There are no spreadsheets to link to the table.
 
J

John Spencer

Use an update query.

UPDATE [Some Table]
SET [Some Field] = "DESC"
WHERE [Some Field] is Null

To build an update query, build a query that shows the field you want to
change and filters the records to show you the records you want to
change. Switch the query to datasheet view to see what records will be
updated (changed). If this looks good then

-- Select Queries: Update from the menu
-- In the UPDATE to box under your field, type "DESC" (include the quotes)
-- Select Queries: Run from the menu

It is a wise person that backs up the data BEFORE using a batch update.
That is the only way to recover if you have made a mistake.

'====================================================
John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
'====================================================
 

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