Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

checkbox issue..

Status
Not open for further replies.

Bob2

Programmer
Jul 3, 2000
228
SE
Hi

I loop through a recordset to display whats in a shopping basket, besides a product description and qty I also have a checkbox option. This checkbox is checked if the value from the database is set to 1. But I can't get the update procedure on that checkbox to work. How can I trigger the update to change the value depending on if the user check or clear that checkbox?


/M
 
You need to check the value of the checkbox which will be either "on" or "off".

You can then set the value of your database field to be either 1 for "on" or 0 for "off".
 
Hi

Got it working now, thanks for your help!

/M
 
if you are using a form with no default values for the checkbox, you might also want to add a hidden input with the names of all the checkboxes in the form in order to verify and account for the ones that weren't checked or unchecked, because an unchecked checkbox returns a zero length string in a request.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top