Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2004
    Posts
    21

    Unanswered: Customizing Combo Boxes?

    I Have a combo box that lists several queries. I dont want it to list the actual names of the queries but rather a more pleasing name.

    Example:

    qryThistothese1 I want displayed as This to this in the box.

    How do I do this in VBA?

    Thank You,
    Dante

  2. #2
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713

    Re: Customizing Combo Boxes?

    Originally posted by darkdante
    I Have a combo box that lists several queries. I dont want it to list the actual names of the queries but rather a more pleasing name.

    Example:

    qryThistothese1 I want displayed as This to this in the box.

    How do I do this in VBA?

    Thank You,
    Dante
    Hide the actual query name column and display the "pretty" description ...

  3. #3
    Join Date
    Sep 2003
    Location
    T.O.
    Posts
    326
    Create a table listing the queries you want in the first column and your nice names in the second.

    Your combo box then requires the following properties:

    • Row Source Type = Table/Query
    • Row Source = the Table above
    • Bound Column = 1
    • Column Count = 2
    • Column Widths = 0",5" - most imp is the 0


    When you address the value of the combo box, such as me.cboQueries, the default col is 0 and will pick the query name corresponding to your nice name.

    DoCmd.OpenQuery me.cboQueries.Value, etc.
    All code ADO/ADOX unless otherwise specified.
    Mike.

  4. #4
    Join Date
    Feb 2004
    Posts
    21
    Wow, hehe that was really easy. I really appreciate your help.

    Thank You,
    Dante

Posting Permissions

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