recalculate fields and reinsert record based on checkbox values
Posted on 2007-12-06
I have a form with lots of numeric value fields. If the users want a similar record with a slightly different calculation on those values I was going to give them a whole separate form on a whole separate page to use, but I thought, what if the user could click a checkbox to say "Create a record with 1/3 these values" and another checkbox "Create a record with 1/4 these values" and so on. If the user checks one or more of these recalculate boxes, then upon Submit, the form would submit three records: one with original values, one with 1/3 values for all the identifed fields (not the name field for example), and one with 1/4 values, etc.
How hard is it to insert several records into the same table with 1 button click? And assuming I had a checkbox named onethird
if (onethird) = checked
(formfield1, formfield2, formfield4) * .33
Or something like that?
What would the syntax be in vbscript?
Any suggestions here?