Value of Checkbox to Access DB

Results 1 to 3 of 3

Thread: Value of Checkbox to Access DB

  1. #1
    Tony Guest

    Default Value of Checkbox to Access DB

    At wits end here. How can you write the value of a checkbox in an HTML form to a Database? I know the value is either true or false (-1 or 0) but how can I get ASP to extract that value and get it to the database? Do I need to convert the value beforehand? Any help would be appreciated.<BR>Thanks

  2. #2
    Ramk( Guest

    Default RE: Value of Checkbox to Access DB

    I think it will work.<BR><BR>If UCase(Request.Form("Checkboxname")) = "ON" Then<BR> objrec("Boolianfield") = True &#039for access<BR> objrec("Boolianfield") = 1 &#039for sql server<BR> Else<BR> objrec("Boolianfield") = false &#039for access<BR> objrec("Boolianfield") = 0 &#039for sqlserver<BR> End If<BR><BR><BR>Thank you,<BR><BR>

  3. #3
    Tony Guest

    Default Thank You

    Thanks,I will try it.<BR>Tony

Posting Permissions

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