help me obi-wan your my only hope (checkbox questi

Results 1 to 2 of 2

Thread: help me obi-wan your my only hope (checkbox questi

  1. #1
    Join Date
    Dec 1969

    Default help me obi-wan your my only hope (checkbox questi

    Im trying to add a value to a database, if the user checks the box it will show up in the database otherwise it will not. &#060;input type="checkbox" name="top2" value=1&#062;<BR>works if the user selects the checkbox,it works, that is value is 1 and a checked box apears in the database. otherwise if the check box is not checked it gives me an error so maybe there needs to be some type of if-then in the checkbox code to generate a zero value if the box is unchecked.<BR>this code writes to an acces97 database with <BR>objRec2("top2") = Request.Form("top2")<BR>the database has the field in the database is set for no default value, datatype yes/no format yes/no<BR><BR><BR><BR>

  2. #2
    ActiveALLI Guest

    Default RE: help me obi-wan your my only hope (checkbox qu

    I dont know how access treats the yes/no data types<BR>but my best guess is that 0 represents No and 1 Yes<BR>Otherwise you can comment out the second line and comment in the third if access wants "No" but not "0"<BR><BR>if Request("top2") = "" Then<BR> objRec2("top2") = 0<BR> &#039objRec2("top2") = No <BR>Else<BR> objRec2("top2") = Request.Form("top2")<BR>End if<BR><BR><BR>

Posting Permissions

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