Quantcast
Channel: Classic ASP
Viewing all articles
Browse latest Browse all 488

prolem using check boxes in forms - data type mismatch

$
0
0

Having an issue with an ASP form, using check boxes.  I keep getting a datatype mismatch.  I'm hoping can someone can tell me the best way to make this work correctly.

So far in my Access database, I have a field called Relocate, with a datatype of Yes/No and a format of True/False.

The html code I am using is this:

<input type="checkbox" name="Relocate" value="ON">

The asp code (which is not right) is this:

Dim strRelocate

                vrelocate = Request.Form("Relocate")

                 If Request.Form("Relocate") = "On" Then
                    strrelocate = "1"
                    Else
                    strrelocate = "0"
                    End If
                vrelocate = Replace(vrelocate, "'", "''")

Can someone please help me with this.  I am pretty new to this, so any help would be appreciated.


Viewing all articles
Browse latest Browse all 488

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>