Insert data into checkbox in Access DBRSS

1 reply

Last post Jun 21, 2004 10:48 PM by Ken Schaefer

  • Insert data into checkbox in Access DB

    Jun 20, 2004 03:13 AM|softair|LINK

    Hello! I have a form that i made that has a checkbox on it, I want the value of the checkbox (on or off) to go into an access database the database field is a yes/no field, does anyone know how to update a yes/no field? I am working out a sample coding, but it does't work, why? Trim(Request.Form("Sex")) & "','" & _ Please give me reply asap. Thanks!
    fm Softair
  • Re: Insert data into checkbox in Access DB

    Jun 21, 2004 10:48 PM|Ken Schaefer|LINK

    There is no type="checkbox" property of a HTML Male Female or a Radio button: <input type="radio" name="radSex" id="radSex" value="true"> Male <input type="radio" name="radSex" id="radSex" value="false"> Female In your SQL statement you need to do something like: INSERT INTO myTable (myCheckBoxfield) VALUES (true) or INSERT INTO myTable (myCheckBoxfield) VALUES (false) (Note, there are no quote marks around those boolean values) Cheers Ken