Results 1 to 5 of 5
  1. #1
    Join Date
    Mar 2003
    Location
    Bogota
    Posts
    67

    Unanswered: triple state tribulation

    Is there a way to use the triple-state property of a check box in concert with a table field so that Yes/No/Null can be stored in the field? The triple state seems to work ok when there is no recordsource to the form, but when I set the recordsource to my table, the triple state doesn't seem to work.

    I want to be able to have the check boxes retain their yes/no/null behavior even when an existing record is brought up and edited. Any ideas? The way I have it now, I'm getting a message:
    'The value you entered isn't valid for this field'

  2. #2
    Join Date
    Jun 2002
    Location
    Mpls/St.Paul area
    Posts
    303
    Sorry can't help you, but regarding design, here is an idea...

    What I do for Yes/No questions is use an option group. Yes=1 No=2. In the table design I use the following specifications.
    data type = number
    field size = Byte
    default value = 255
    validation rule = 1 or 2 or 255

    When the user views the form, the option group buttons are not gray (indicating null). Also when searching the table, it is easy to find questions that have not yet been answered (values of 255).
    John
    This is the day the Lord has made, I will rejoice and be glad in it.

  3. #3
    Join Date
    Mar 2003
    Location
    Bogota
    Posts
    67
    I tried it, but there are 2 problems:

    1). Once one of the options (yes/no) are selected, the control won't revert to the 'null' state where neither is selected.

    2). The option group just takes up too much screen space (I have to use 30 of these things)

    I really want to keep the check boxes going if possible. The users are already used to them. I just want to add the triple-state 'grey' functionality.

  4. #4
    Join Date
    Mar 2003
    Location
    Bogota
    Posts
    67

    check box glory

    Ok, I tooled around with the idea you gave me and got it!

    The check box properties:
    triple-state >> true
    default value >> null

    The table field properties:
    type >> integer

    I guess the only reason the type 'byte' didn't work with the check box is that a checked check box returns a -1, and byte can't express negatives. But integer can, and the table will be filled with 0's, -1's and nulls.

    Thanks for the hint.

  5. #5
    Join Date
    Jun 2002
    Location
    Mpls/St.Paul area
    Posts
    303
    Good Work!
    John
    This is the day the Lord has made, I will rejoice and be glad in it.

Posting Permissions

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