Auto Populate Empty Table

  • Thread starter Thread starter WPW07
  • Start date Start date
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.
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top