Creating new Records in a Table

Scatman

Registered User.
Local time
Today, 08:06
Joined
Feb 11, 2000
Messages
27
I think this is a pretty simple thing, but for some reason I'm lost.

I need to add a number of records to a table.

The user would input a starting record number and ending record number (ie 60000, 60003) and access would create those records with the record number field populated with all the values, in other words, it would create 4 records 60000,60001,60002, and 60003

any ideas how this can be done? I'm thinking a query, but it might require coding of a for...next loop???

Thanks in advance for the help
 
No, not 4 numbers for one record. I want access to create the records using the inputted numbers and populate the ID field with the individual numbers.

using the example I gave, I want access to create 4 records and when its done, the table would look something like this:

Record_ID
60000
60001
60002
60003

sorry if I made that confusing....hope this helps
 
i think you need to use code.

either use a recordset, and iterate using addnew and update methods.

or use a query to add records one at a time. Store the counter variable in a global, and use a function call to retrieve that in an append query.


matter of taste - second method is easier if you are not used to handling recordsets
 
I understand what you are saying with the second method, but I'm not sure how to set it up.

Can anyone help with this?
 

Users who are viewing this thread

Back
Top Bottom