Consulting

Results 1 to 5 of 5

Thread: Solved: Listbox Problem

  1. #1
    VBAX Regular
    Joined
    Jun 2005
    Posts
    30
    Location

    Solved: Listbox Problem

    Hey,
    i have a listbox which display some boolean data.
    Is there a method to change the style of displaying the boolean data instead of just showing (1 or 0) or (True or False). Can i show like "Tick" for true value and "cross" for false value and etc.!

    thanks for reading and your consideration!

  2. #2
    VBAX Regular jadedata's Avatar
    Joined
    May 2004
    Location
    Eastport, Maine
    Posts
    13
    Location
    Build a query and use the query as the source for the list box.

    select True as ListValue, "Yes" as ListText
    union
    select False as ListValue, "No" as ListText
    From anytablename
    (you could actually use a real table for this...)


    use both columns in the listbox

    I suggest also that you keep the booleans in a "hidden" (zero width) column to use if needed as boolean datatypes.... not required though!
    Last edited by jadedata; 09-13-2005 at 07:48 AM. Reason: oops
    -j-

  3. #3
    Moderator VBAX Master geekgirlau's Avatar
    Joined
    Aug 2004
    Location
    Melbourne, Australia
    Posts
    1,464
    Location
    Did this solve your problem? Don't forget to mark the thread as solved!

  4. #4
    VBAX Regular
    Joined
    Jun 2005
    Posts
    30
    Location
    okie this is my way to solve this problem...although it's a bit weird but it's work as what i intend to....

    instead of using listbox to show the data,i choose sub form to replace it!
    I created a form,using record source to pull the data which i want from the table.In the form itself ,i place the checkbox and the form itself i tie with the table together. Name the checkbox as the same name with the table field name.Haha..it's works...anyway...thanks for reading and consideration!

  5. #5
    Moderator VBAX Master geekgirlau's Avatar
    Joined
    Aug 2004
    Location
    Melbourne, Australia
    Posts
    1,464
    Location
    Yes, one of my pet peeves is the fact that you don't have control over the format of data displayed in a list box without changing the data type - bit of a nuisance for dates and boolean values! Oh well, another item to mention to Bill Gates next time he calls.

Posting Permissions

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