Unable to pass boolean value to database

Hi!
I'm using vbscript in an HTML page to append a record to a database.  One of the fields on the form is a checkbox and I use the following form validation:

form18 = main.TUSER.value
If main.TUSER.Checked Then
         form18 = "YES"
      Else
      form18 = "NO"
      End If

I know the 'if statment' works because it populates the correct information in an alert box... However, I get 'data type mismatch in criteria expression' error upon appending a record.   I've checked the db and the field is set up as boolean.  Yes/no's actually show in the field in the database instead of checkboxes.  Is there another setting that I may be missing?  I've assigned a 500 point value due to urgency.  Thank you!
MoJeaux39Asked:
Who is Participating?
 
Raynard7Connect With a Mentor Commented:
Use true and false or -1 and 0 instead
0
 
justchat_1Commented:
yes despite what value is displayed. true/false is the value stored...
0
 
MoJeaux39Author Commented:
I wound up using -1/0 as suggested... didn't like the T/F.  Thank you for the solution!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.