Anthony1312002
Programmer
I have a form that's connected to an Access table. In the table I have a yes/no field called Tran01903. In my form I also have a checkbox called Tran01903. What I'm trying to do is make possible for me to update the table when I either check or uncheck the checkbox in the form. I'm using the code below but it's not working. Presently it leaves the field empty no matter what I do. Any thoughts on how to do this?
sql_update1903 = "UPDATE CustomerBoxes SET Tran01903 = "
If Request.Form("Tran1903") <> False then
sql_update1903 = sql_update1903 & "True"
Else
sql_update1903 = sql_update1903 & "False"
End If
'And finally the WHERE portion
sql_update1903 = sql_update1903 & " WHERE CustomerID = 170 "
'Make it so!
conn.Execute sql_update1903
sql_update1903 = "UPDATE CustomerBoxes SET Tran01903 = "
If Request.Form("Tran1903") <> False then
sql_update1903 = sql_update1903 & "True"
Else
sql_update1903 = sql_update1903 & "False"
End If
'And finally the WHERE portion
sql_update1903 = sql_update1903 & " WHERE CustomerID = 170 "
'Make it so!
conn.Execute sql_update1903