locked
Displaying Checkbox fields in a listbox RRS feed

  • Question

  • I have several Boolean fields in my tables.  "Voided" is one of them.  I'll use that field as an example in my question.

    When I display a data sheet the "Voided" field appears as a Checkbox as I desire.

    When I include it in a listbox Table/Query, it will only appear as True or False.

    Is there any way to configure that field in the query or in VBA that will display it as a checkbox, or am I wasting my time trying?

    Thanks.

    Marj Weir

    Sunday, January 24, 2016 12:23 AM

Answers

  • Thank you! I like to know when I'm beating my head against a brick wall.  It feel so good when I stop.

    I understand what you're saying about subforms and use them as well.  I may try to adapt more of my selection listboxes in this way.

    Marj Weir

    • Marked as answer by Marj Weir Sunday, January 24, 2016 10:02 AM
    Sunday, January 24, 2016 10:02 AM

All replies

  • I have several Boolean fields in my tables.  "Voided" is one of them.  I'll use that field as an example in my question.

    When I display a data sheet the "Voided" field appears as a Checkbox as I desire.

    When I include it in a listbox Table/Query, it will only appear as True or False.

    Is there any way to configure that field in the query or in VBA that will display it as a

    I'm afraid you're wasting your time trying -- with a list box, anyway.  The columns of a list box are always strings, so there's no way to get it to display a column of check boxes.

    You could potentially use a subform instead of a list box, formatted to look a lot like a list box.  Some clever coding tricks would be needed if you want it to behave like a list box, but I believe most list box features could be simulated.


    Dirk Goldgar, MS Access MVP
    Access tips: www.datagnostics.com/tips.html

    Sunday, January 24, 2016 12:44 AM
  • Have you considered an Option Group on the from and a table with number field matching the option number and text field?

    Build a little, test a little

    Sunday, January 24, 2016 3:04 AM
  • Thank you! I like to know when I'm beating my head against a brick wall.  It feel so good when I stop.

    I understand what you're saying about subforms and use them as well.  I may try to adapt more of my selection listboxes in this way.

    Marj Weir

    • Marked as answer by Marj Weir Sunday, January 24, 2016 10:02 AM
    Sunday, January 24, 2016 10:02 AM
  • Thanks again.  I tried this with some success on some datasheet lookups using textboxes tied to the check box fields instead of loading them from the Existing Fields list. Then I configured their formats on the Format property with the code ;"True"[red];"False"[black].  This works well.

    However, in a form where I am using a subform that is filtered by some user input as a lookup tool, I am having issues.

    I can't get the subform to activate the corresponding record for editing.  I have the parent form and the child subform linked by the ID (an autonumber field), but when a row is selected, the parent form remains unchanged.

    I also can't seem to disable the down arrow tips on each column that allow sorting and selection which I don't want to permit.

    Any ideas?

    Monday, January 25, 2016 7:40 PM
  • Update on the last post.  I resolved the main issue with the parent and the subform and it is now working.

    The other issue concerning the down arrow tips is still allowing sorting which would be acceptable if there were a way to return to the previous status before the user sorted it, but that seems impossible.  What controls that  in a subform?

    Thanks.

    Marj Weir

    Monday, January 25, 2016 8:17 PM
  • Final post! 

    All is well.  It was the Shortcut Menu I had to turn off.

    Monday, January 25, 2016 8:45 PM