Update Column in original table -------M------

M

Mark909

Hello,

I need to update a single column in a table containing 20000 records.

I need to update every record in the column with the number 1.

Im sure its not too hard but i cant seem to find how to do it.

Thanks!
 
B

Brendan Reynolds

Mark909 said:
Hello,

I need to update a single column in a table containing 20000 records.

I need to update every record in the column with the number 1.

Im sure its not too hard but i cant seem to find how to do it.

Thanks!


If I understand correctly, that you want to assign the value 1 to a specific
column in every record ...

CurrentDb.Execute "UPDATE YourTableNameHere SET YourColumnNameHere = 1"

This assumes the column is a numeric column. If it was a text column you'd
need quotes around the value being assigned ...

CurrentDb.Execute "UPDATE YourTableNameHere SET YourColumnNameHere = '1'"
 
Top