Adding multiple identical records from a form

Fiona H

Registered User.
Local time
Today, 12:54
Joined
Oct 25, 2006
Messages
28
Hey there,

Please could somebody point me in the right direction?

I would like to add multiple identical records to a table via one input form. All the details to be added to the table will be identical with the exception of the primary key, which is an autonumber field. It will usually be 10 records at a time.

The background for this is.... Each manager has a batch of 10 overtime slots. He gets 10 unique approval numbers generated by the database before the overtime is completed. At this stage the records can contain all the known information which is identical like the manager’s name and area. Once the overtime has been done the record is updated with the information which was not known at the time the unique number was generated, like type of work and time taken.

My apologies if this is a dumb question or incredibly obvious. Any help you could offer would be appreciated!! :)

Thanks
Fiona
 
I'm far from an access expert but wouldnt it be easier to generate the number at the same time as you enter the data?
 
This link will provide a solution. Although it also duplicates records in a subform, you can choose to use or ignore this portion of the code presented. But posted this link just in case.

HTH,

-dK
 
ooh sorry Faspus, I guess I didn't explain properly...

I want to create 10 identical records at the same time, with one click of a button.

The records are created before the work takes place, therefore they can't be completed in full at the time the record is created.
 
thanks for the reply dkinley, can I use this to duplicate 10 records in one go?
 
Something like:

Code:
dim db as DAO.Database
set db = currentdb

For i = 1 to 10
    db.execute "INSERT INTO ..."
Next
 

Users who are viewing this thread

Back
Top Bottom