Auto Populate Empty Table

W

WPW07

Hello,

How would I auto populate an empty table with values 6000-10000. It
contains just one field [ID].

Thanks for your help.
 
K

Klatuu

This is an unusual thing to be doing. Why not create the records as you need
them?
In any case, you could use a routine like this:

Dim lngIdNumber As Long

For lngIdNumber = 6000 To 10000
strSQL = "INSERT INTO tblClient ( MainName )SELECT " & lngIdNumber &
" AS Dummy;"
CurrentDb.Execute strSQL, dbFailOnError
Next lngIdNumber
 
Top