Using an Append Query to add multiple records to a table

  • Thread starter DougW via AccessMonster.com
  • Start date
D

DougW via AccessMonster.com

I need to create a number of duplicate records in a table (the records will
be edited later).
I have a form that has this table as the record source. The user selects
fields from various lists on this form and by clicking an "add record" button
one new record is created in the table. I have added another field on the
form to indicate how many duplicates of the last record are desired.
I have a select query that creates the desired number of duplicates of the
last record in the table (the criteria uses the DMax function to select the
last record in the table).

All of this up to this point works ok.

I then created an append query that takes the contents of the "duplicated
record" query and adds it to my table. I would like to run the "add
duplicate records" from an action button on the form.
My problem is that when I go to run the append query, I get the following
error message:

"The table "Ordered Items" is already opened by another user, or it is
already open through the user interface...".

It appears this happens because my data entry form is open, and my table is
the record source for this form. Any suggestions on how I can get the
append query to run while the form is open?
I can't practically close my form, since that is the source of the number of
duplicates needed, plus I would like it to remain open for further data entry.


Many thanks in advance for any ideas on this!
 

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

Top