Forum Moderators: open

Message Too Old, No Replies

Asp Form

         

ebuilder

5:17 pm on Mar 7, 2007 (gmt 0)

10+ Year Member



I am using an access database to display results inside a form. I have added a checkbox next to each result. When a user selects an item and submits it to a new table I cannot get the item or items to submit properly. Any ideas?

ebuilder

5:30 pm on Mar 7, 2007 (gmt 0)

10+ Year Member



To populate the value of the Checkbox I am using the following:

<%=Request("ID")%>

The checkbox is inside a database results form. When I check one or more than one box I get no data. I checked the source code on the page and it shows Checkbox Value = "" so obviously I am using the wrong request code above.

mattur

5:35 pm on Mar 7, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If you were to provide at least some basic information, including a short snippet of the relevant code and any error messages, I'm sure someone would be able to help you.

ebuilder

5:48 pm on Mar 7, 2007 (gmt 0)

10+ Year Member



Thanks for the advice:

Here is the line of code for the checkbox:

<input type="checkbox" name="C1" value="<%=Request("ID")%>">

I was hoping that when someone searrched my database and found a record or records that they like they could simply check one or more boxes and the ID(s) would then be submitted to another table inside the same database that displayed the results. Problem is I don't know code very well so I am using FP Database Results Inside a Form that can be submitted but the Request ID is blank after the results. With or without the box being checked.

mattur

8:39 pm on Mar 7, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Is this checkbox displayed on the database form that is then submitted? If so, then you need to put the database record ID in the checkbox, eg:

<input type="checkbox" name="C1" value="<%=rst("ID")%>">

Where rst is the recordset object that you're using to display the form data.

You then pick up the ID(s) on the page your form submits to, eg to just display the ID's:

For i = 1 to Request("C1").Count
Response.write Request("C1")(i) & "<br>
Next