Results 1 to 3 of 3
  1. #1
    Join Date
    May 2005
    Posts
    1,191

    Unanswered: Combo Box Option

    I have a combo box on a form that looks back at all previous distinct entries in a field to populate the box. The row source code is similar to as follows:
    Code:
    SELECT DISTINCT TblName.FieldName FROM TblName ORDER BY TblName.FieldName;
    What I'm wondering is it possible to continue looking at the fields to populate the list, but to add an option at the top? For instance, if the query yields
    OptionA
    OptionB
    OptionC
    is it possible to add a static entry at the top, such as "OptionA & OptionB". I can then handle this option specifically later on in the code, I'm just wondering if this is possible, and if so, how?

    Thank you in advance for any help you can offer.
    Me.Geek = True

  2. #2
    Join Date
    May 2005
    Location
    Nevada, USA
    Posts
    2,888
    Provided Answers: 6
    What is it you're trying to accomplish? It sounds to me like more of a situation for a multiselect listbox, which would let users select any combination of the options.
    Paul

  3. #3
    Join Date
    May 2005
    Posts
    1,191
    I could use a combo box, however I am not nearly as proficient with them (such as selecting multiple entries).

    The combo box is on a search form. The box is populated using a distinct query (as seen above), but the client wants to just add one option at the top, so I was hoping to be able to just do a select distinct query + one option. There's also another dB I'm working on that would need an option at the top of the list that is exclusive from the distinct query returns (it will never *knocks on wood* be found by querying).

    More generally speaking, someone could use this same set up for themselves to have a general "All" option at the top. I know you can just do a ZLS and handle it from there. But many of the people using my dB's don't like to read instructions like that on the form, then complain to me that there's "no way to select all options".

    Please let me know if I need to clarify further. As always, thanks for the help
    Me.Geek = True

Posting Permissions

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