469,361 Members | 2,388 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,361 developers. It's quick & easy.

Paste into multiple records in a table?

I have a table which I have added another field to. This field has a default value of NA and although any new entries will automatically have the default value of NA, I need to enter NA in all the current records and there are 2047 of them. Other than copying and pasting "NA" one by one into 2047 records is there a quicker way to do this. I tried selecting multiple records in the table and pasting but it only pastes into the first record selected.

Please tell me there is a quicker but simple way to do this.

Many thanks
Sep 9 '10 #1
5 10735
32,185 Expert Mod 16PB
A simple UPDATE query should do the trick for you :
Expand|Select|Wrap|Line Numbers
  1. UPDATE [YourTable]
  2. SET    [YourField] = 'NA'
  3. WHERE ([YourField] Is Null)
I've assumed you only want to update those items where the field has no data in it currently. If you want to set all records regardless then simply remove the WHERE clause in line #3.

Welcome to Bytes!
Sep 9 '10 #2
Many thanks. Just to check though..there are other fields that have records with a null value that I wouldnt want to have updated to NA - would following the update query only update records within a certain field or would it update all field records within the table that had a null value?
Sep 9 '10 #3
32,185 Expert Mod 16PB
It would only update records that had a Null in that particular field. The selected records would only have the specified field updated. Exactly what you need Lucy :)
Sep 9 '10 #4
Genius!!! Thanks NeoPa!! Always wondered what an update query was!! I'm self taught in access and slowly getting there!!
Sep 9 '10 #5
32,185 Expert Mod 16PB
You're very welcome of course :)

Come back with more questions when you need. That should make the learning curve a little steeper.
Sep 9 '10 #6

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.