incrementing

  • Thread starter Thread starter Mike
  • Start date Start date
M

Mike

I have a table that has a number field which is set a
zero (0) when the table is built. I wonder if there is a
way to use an update query to go through the table from
the first record to the last, and increase that number
field by 1 as it goes. So, the first record would have a
1 in that field, the 2nd would have a 2, and so on. If
not, can someone share with me some VB code to do that?
Thanks.

Mike
 
First, you must realize that Access tables have no first or last record.
However, I would try add a new, autonumber field. This will create numbers
from 1 to whatever. If you don't want to keep this as autonumber, change the
field type to numeric.
 
Back
Top