New column value

User Name

Registered User.
Local time
Yesterday, 19:30
Joined
Jun 10, 2003
Messages
26
I imported a table into access and I want to add a column in that has a value for 1 for every row. Instead of having to go into the table and changing every single one. (400,000) Is there a way of doing it with VBA or a macro? If so how? Thanks.
 
Add the column, set it's default to 1 (if you always want it to default to that).
Use a query to update all the rows, you don't need any criteria since it is a new column and you are updating all rows.

UPDATE MyTable
SET NewCol = 1
 
where do I enter this.

UPDATE MyTable
SET NewCol = 1
 
Go to Query Tab within Access database and create a new query with this syntax.
 

Users who are viewing this thread

Back
Top Bottom