Entering one number and adding one to give me 1,2,3

E

Erin Freeman

Hi there,

I have to add a bunch of old data into our database, I need to add records
with the starting value being 2001201 and need to add records all the way up
to 2001550, i would like to just put the first number in and run code to add
one so i dont have to do it manually. does anyone have any suggestions. ?
this field can not be an auto number. thanks
 
J

John W. Vinson

Hi there,

I have to add a bunch of old data into our database, I need to add records
with the starting value being 2001201 and need to add records all the way up
to 2001550, i would like to just put the first number in and run code to add
one so i dont have to do it manually. does anyone have any suggestions. ?
this field can not be an auto number. thanks

This can be done handily using a little auxiliary table. Create a table named
Num, with one Long Integer field N as its primary key. Fill it with values
from 0 to 100000 or so (you can use Excel... Insert... Series to do this very
quickly, and import or copy & paste the spreadsheet into Num).

Then base an Append query on Num, appending

2001201 + [N]

using a criterion of

<= 450

on N.
 
Top