I am trying to add records into an Access 2010 table. Each time, I need to add 10 records (numbered 1-10). All other fields are the same for all 10 records.
The fields I am using are: SampleNumber (autonumber), SampleSite (always numbered 1-10), CollectionDate (date), StudyDay (number), ID (number).
For example, on CollectionDate 3/14/13, we collect 10 samples for ID 20. All samples have the same CollectionDate, StudyDay and ID but are numbered 1-10.
Ideally I would enter each static field plus 1 for SampleSite once and the program would loop through adding 1 to SampleSite until 10 records are created.
I've tried the INSERT INTO operation and have figured out how to copy the rows exactly but need help with the consecutive numbering. I imagine this would be done with a loop?
The fields I am using are: SampleNumber (autonumber), SampleSite (always numbered 1-10), CollectionDate (date), StudyDay (number), ID (number).
For example, on CollectionDate 3/14/13, we collect 10 samples for ID 20. All samples have the same CollectionDate, StudyDay and ID but are numbered 1-10.
Ideally I would enter each static field plus 1 for SampleSite once and the program would loop through adding 1 to SampleSite until 10 records are created.
I've tried the INSERT INTO operation and have figured out how to copy the rows exactly but need help with the consecutive numbering. I imagine this would be done with a loop?
Comment