Add multiple new records based on quantity duplicating data

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

Guest

I am creating a simple form to allow a new user to list a part number and
requested quantity.
Upon executing a submit button, I would need the part number value
added/duplicated into an existing table as many times as the requested
quantity.
However, the requested quantity can not exceed 999.
 
Simplest solution if you are familiar with code would be to OpenRecordset,
and AddNew in a loop.

An alternative would be to create a table containing 999 records, and use it
as the source table for an Append query statement, with criteria limiting it
to the desired number. This link explains how to create the table and add
the records:
http://allenbrowne.com/ser-39.html

(BTW, the same code also illustrates how to do an AddNew in a loop.)
 

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