Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Insert n rows based on start number 1

Status
Not open for further replies.

kiberu

Programmer
Mar 23, 2001
12
UG
I need a method where I can insert e.g 100 rows into an existing table but with a new serial number for each row.

Kindly advise.
 
Depends on what your Serial Number looks like but this should get you close

dim rst as DAO.Recordset
dim i as integer

Set rst = Currentdb.OpenRecordset("YourTable", dbOpenDynaset)
For i = 1 to 100
rst.AddNew
rst![SerialNumber] = YourSerialNumber + i
rst.Update
Next


Paul
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top