null in Access

Results 1 to 3 of 3

Thread: null in Access

  1. #1
    Join Date
    Dec 1969

    Default null in Access

    I have a form that has checkboxes, value is 1 if checked, that submit to page that inserts to an Access database. The fields in the database are set to number. I keep getting a datatype mismatch error. Based on a response to an earlier post I'm beginning to think that the problem is that if the checkbox is not checked the null value can't be inserted into the databse. Is that true?

  2. #2
    Alotta Fagina Guest

    Default RE: null in Access

    Set the field in the database to yes/no.<BR>And no, not true. A checkbox always has a value, checked or unchecked

  3. #3
    Join Date
    Dec 1969

    Default About checkbox

    A checkbox&#039;s value is what you set to it in the value property of the &#060;input&#062; tag. If no value is set, the default value is "on". You can retrieve a checkbox&#039;s value using Request.Form when the checkbox is checked and get a zero-length string when it is not checked. Therefore assigning checkbox value to a database field may cause error if the checkbox is not checked and the database field does not accept zero-length string.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts