Prompt for the number of times to duplicate current record

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I want to have a button on my form that will ask you how many times to copy
the current record and then copy that many times.

I cannot find anything on this. Can someone please help me?
 
Why? I'm not asking to be snoopy, but because a well-normalized relational
database may not need duplicate records.

Can you describe a bit more about the business need you feel this approach
(duplicate records) will help you solve?

Regards

Jeff Boyce
Micosoft Office/Access MVP
 
Not sure what you mean by copying the records, but to create a loop try:

Dim Response As Integer, I As Integer
Response = InputBox("Please select a number")
For I = 1 To Response
' The process in the loop
Next I
 
My form is for collecting measurement data of cut widths. There might be 55
cuts at 1.25" and 10 at 2.5". I have a drop down field where the user can
select the size they are measuring. If there are 55 of the same, being able
to duplicate a record of that size will eliminates the need to select from
the drop down for each one.
 
Thank you for the help, but it didn't work. I put it in the "on click" of the
button. It is in a subform if that makes a difference.
Here is why I need this.
My form is for collecting measurement data of cut widths. There might be 55
cuts at 1.25" and 10 at 2.5". I have a drop down field where the user can
select the size they are measuring. If there are 55 of the same, being able
to duplicate a record of that size will eliminates the need to select from
the drop down for each one.
 
Krispy said:
My form is for collecting measurement data of cut widths. There might
be 55 cuts at 1.25" and 10 at 2.5". I have a drop down field where
the user can select the size they are measuring. If there are 55 of
the same, being able to duplicate a record of that size will
eliminates the need to select from the drop down for each one.

If these are standard width sizes that are often paired together then
you likely should normalize your table. That is you should have a separate
table with width sizes related to the primary table and not record and save
all that duplicate data for each record.
 
There are no standard sizes. If varies from order to order.
I appreciate your response, but I really need to do just what I am asking
for. I need a way to copy the current record (with the exception of the key
field) as many times as I respond in a prompt.
 
I should have said that it did work somewhat. The prompt box comes up asking
for a qty, but after you enter it, it doesnt add the records into the subform
 
I'm sorry. It does work. Wahooo!

I had to add to put in the copy record code where you said " 'process to
loop" (dahhh!).

Thank you very much!
 

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