Get ready for BLACK FRIDAY shopping starting in

Forums

This topic is locked

Loop Code w/in Insert Page...Need Progr. Advice

Posted 14 Feb 2002 00:10:28
1
has voted
14 Feb 2002 00:10:28 Loren Reeves posted:
I am going crazy with this problem....let me explain in detail.

My database table looks as follows:
CoupleSelectionID = Unique Field for This Table
CoupleID = Unique ID for Couple
ProductID = Unique ID for Products
UnitsRequest = Amount of Product requested
Units Purchased = Amount Product purchased

I have an insert form that contains a Hidden Value for the CoupleID and ProductID

Within the form I have a text field box for UnitsRequested with a default value of 0

Repeat region is applied to all the products that match the certian criteria

What I need to happen in my insert form is

*If the value of Units Requested is 0, skip the product and do not enter into the database
*If the value of Units Requested is greater than 0, add the CoupleID, ProductID, and Units Requested to one line in my table to have a unique value in Couple Selection ID
*So on and so forth until every product has been checked for that form
I have one insert button for the entire form. I need to make sure that multiple entries can be made to my table
Ex. I have 10 out of 35 of the products selected with a value over 0, I need 10 entries into my database.

Thanks for your time,
Loren



Reply to this topic