I have a database (currently Access soon to be SQL) with about 200 'yes / no' indicators in it. My current coding method is to 'convert' to radio buttons each time for each field, e.g.:
<td><input type="radio" name="field43of200" value="yes"
<%if rsData("field43of200")
then response.write("checked") : response.write("") %>> Yes</td>
<td><input type="radio" name="field43of200" value="no"
<%if not rsData("field43of200")
then response.write("checked") : response.write("") %>> No</td>
Then to 'convert' the other way (from the radio button or checkbox) on add / update:
UserSQL = UserSQL & "'" & if request.form("field43of200") = 1 then TRUE else FALSE end if & "'"
(I haven't tested, so my syntax may be off.)
Is there a better way to approach this? Seems like an awful lot of coding.
Thanks
<td><input type="radio" name="field43of200" value="yes"
<%if rsData("field43of200")
then response.write("checked") : response.write("") %>> Yes</td>
<td><input type="radio" name="field43of200" value="no"
<%if not rsData("field43of200")
then response.write("checked") : response.write("") %>> No</td>
Then to 'convert' the other way (from the radio button or checkbox) on add / update:
UserSQL = UserSQL & "'" & if request.form("field43of200") = 1 then TRUE else FALSE end if & "'"
(I haven't tested, so my syntax may be off.)
Is there a better way to approach this? Seems like an awful lot of coding.
Thanks