asp: form on pg2 dependant on pg1 form data

seala

Beta member
Messages
1
I have a form that contains misc information at the top and multiple checkboxes at the bottom of the form. The user can select one or more checkboxes (all have unique names and values.

I've coded each of my checkboxes on the 2nd page (may need include to do it efficiently) the same as the example below.

If Request.Form("ck_SnowRemEquip") = "-1" Then
strSnowRemEquip = "5600"
Else
strSnowRemEquip = ""
End If

The purpose of the above coding is to assign a variable the key to a table in an Access db to allow me to dynamically create a subset of checkboxes on the 2nd page. For example:
Checkboxes on first page:

ck_OfficeEquip, ck_OfcSupplies, ck_Roofing, ck_OfcFurniture,
ck_Computing, ck_FloorCvrng, ck_SnowRemEquip, etc.,

If the user checks ck_OfficeEquip, ck_OfcSupplies, and ck_OfcFurniture I need the next page to show a list of checkboxes for ck_OfficeEquip (calculators, printers, etc.,) a list of checkboxes for ck_OfcSupplies (staples, tape dispensers, pens, pencils, etc.,) and a list of checkboxes for ck_OfcFurniture (chairs, desks, file cabinets, etc.,). These lists would be generated from a table in my db using the 4-digit number I've assigned to the variable in my if statement.

My problem is I need to hold on to all data from both pages so that at the end of the 2nd page, after the user has made selections from the 2nd set of checkboxes on page 2 and they click submit, all of the data is added to the database. I have no idea how to write my sql so that I'm only getting the subsets for the items checked from page one. I'm sure there are other issues I'm going to have for this project, but thats my main stumbling block. I'm relatively new to asp and am also new to vbscript - does anyone have any suggestions?? Hopefully, I've explained this correctly so I'm not confusing everyone else as much as I've confused myself. All help would be monumentally appreciated!!!!!!!!!!!
 
Back
Top Bottom