Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Duplicate Records Based on Quantity Requested

Status
Not open for further replies.

vbreezy

Programmer
May 18, 2001
5
US
I have an order file that consists of the fields: order#, customer#, item#, and quantity.

I store this information in a temporary table. When the quantity is greater than one (for example, quantity is 6), I need to create 6 instances of that record so 6 items are manufactured and sent to the customer.

Does anyone know a way in Access 97 to create duplicate entries based on the quantity requested.

Any help would be appreciated.

Thanks.

Vicki
 
Vicky,

Create a sub-routine with the following steps:

1) Read the value of the text/combo box
2) Open a recordset to append your new order to
3) Using a For Next loop upto the value read in from the box
4) Add new record to the recordset
5) Append in the fields in
6) Update the recordset
7) Loop
8) Close the recordset.

If you need help with a specific function, i'd need to know the exact specs of your db.

Drop a reply if you need more help.

Craig
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top