By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,064 Members | 1,388 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,064 IT Pros & Developers. It's quick & easy.

Duplicating records

P: 2
My problem is this, I can set up a command button to duplicate a record everytime I click on it. What happens is that I get a record but it will be at the end of the table. For example, if I am on record 5 of 10 records and I click on my button I get a new record as number 11, I want the record to be number 6, inserted after the record I click on. I need to have the records in order because the next step is to generate a new number for the new records, in order. I have not gotten that far. Any help?

thanks
May 14 '07 #1
Share this Question
Share on Google+
2 Replies


missinglinq
Expert 2.5K+
P: 3,532
First off, a new record will always be added to the end of the table, and thus if you have 10 records and add one, it will be #11. Depending on how the underlying query is sorted, doing a requery of the form may or may not place the new record next after the copied record in the form. But it's position in the table will still be #11.

because the next step is to generate a new number for the new records, in order
How are you generating the "new number?"
May 15 '07 #2

P: 2
First off, a new record will always be added to the end of the table, and thus if you have 10 records and add one, it will be #11. Depending on how the underlying query is sorted, doing a requery of the form may or may not place the new record next after the copied record in the form. But it's position in the table will still be #11.

How are you generating the "new number?"
First of all, thank for your help. What I have is a table and form1. Form1 will have only a few of the fields in the table and group1 will fill out form1. Later group2 will call up form2. Form2 will have the fields that group1 filled out and group2 will finish filling out the form2. In most cases when group2 fills out form2 they will hit a button and the next 'analysis number' will be generated and put into the proper field. In some cases group2 will need to generate duplicates copies of the record and then generate 'analysis numbers' for each record. For example: record 10 is on the screen, group2 duplicates this record twice. Record 10 is still on the screen and group2 generates a number, say 5000. They would need to then go to the two newly duplicated records, at the end of the table, and generate 5001 and 5002. I hope this makes sense and you can help.

Thanks
May 15 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.