Results 1 to 3 of 3

Thread: Check box question

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Sep 1999
    Location
    London, England
    Posts
    213
    I have created a registration form.

    I want to use a check box with my registration form. If the user checks the box I want to enter a values of yes into my database table when the user submits the form. If the check box is unchecked I want to enter no. How do I code this ?

  2. #2
    Frenzied Member HarryW's Avatar
    Join Date
    Jan 2000
    Location
    Heiho no michi
    Posts
    1,827
    What's the problem you're having with this? If you can code the rest of it (I'm assuming the form's contents are included in the form too) then you ought to be able to code this. Just check whether the value of the variable passed by the checkbox is True or False, and enter the corresponding value in your recordset. If it's a problem with the database you're having then just explain it.
    Harry.

    "From one thing, know ten thousand things."

  3. #3
    Frenzied Member monte96's Avatar
    Join Date
    Sep 2000
    Location
    Somewhere in AZ
    Posts
    1,379

    Code:
    If Request.Form("CheckBox1") = "on" Then
        'Do Whatever...
    Else
        'Do Whatever else...
    End If

    Make sure you give the checkbox a name and replace Checkbox1 above with that name.

    oOOo--oOOo
    __/\/\onte96
    oOOo--oOOo
    Senior Programmer/Analyst
    MCP
    [email protected]
    [email protected]


    Your results may vary.. some restrictions may apply.. pricing and participation may vary.. not available in all states.. professional driver closed course..quantities limited..

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width