D
David
Hi,
I have a form on which a user can select a checkbox against a record.
Each checkbox carries the RecordID of a product.
----------------------------------------------------------------
I am trying to print the following report:-
Details for product 1
--------- Report / page Break ---------------
Details for Product 6
--------- Report / page Break ---------------
or for whatever products were selected.
Before the report is printed, the form submits to the next page with
some code as follows:
For i = 1 to Request.Form("printme").Count (where printme is the
name of the checkbox)
fieldName = Request.Form.Key(i)
fieldValue = Request.Form.Item(i)
if Request.Form.key(i) <> "Submit" then (Ignore Submit button)
strquery = ""
strquery = "SELECT * FROM reports"
strquery = strquery & " WHERE ((reports.ReportID='" & fieldValue &
"'));" (equals first selected record)
Set RS = adoDataConn.Execute(strquery)
Write out report for first ID retrieved in fieldValue
else
end if
Next
-------------------------------------------------
The problem is I cannot get my SQL code to pickup the next ID from the
For ... Loop
Can you help
Thanks
David
I have a form on which a user can select a checkbox against a record.
Each checkbox carries the RecordID of a product.
----------------------------------------------------------------
I am trying to print the following report:-
Details for product 1
--------- Report / page Break ---------------
Details for Product 6
--------- Report / page Break ---------------
or for whatever products were selected.
Before the report is printed, the form submits to the next page with
some code as follows:
For i = 1 to Request.Form("printme").Count (where printme is the
name of the checkbox)
fieldName = Request.Form.Key(i)
fieldValue = Request.Form.Item(i)
if Request.Form.key(i) <> "Submit" then (Ignore Submit button)
strquery = ""
strquery = "SELECT * FROM reports"
strquery = strquery & " WHERE ((reports.ReportID='" & fieldValue &
"'));" (equals first selected record)
Set RS = adoDataConn.Execute(strquery)
Write out report for first ID retrieved in fieldValue
else
end if
Next
-------------------------------------------------
The problem is I cannot get my SQL code to pickup the next ID from the
For ... Loop
Can you help
Thanks
David