Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2003
    Posts
    16

    Unanswered: adding an "all" item to a combo box

    I have a combo called supervisors whose row source is set to query:
    SELECT DISTINCT [audit].[Supervisor] FROM audit WHERE [audit].[Regional Office]=[Forms]![frmSearchPD]![Regional Office];

    This combo is filtered depending on the values in combo Regional Office, and is used to print reports based on the supervisor name. What I am trying to do is add an ALL or * to the combo box to be able to print reports for all supervisors in the combo box.

    Please help!

    Thanks,
    Jason

  2. #2
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    instead of populating the combo directly from the query you could create a recordset from your query and add a record to the recordset for "*" and populate your combo from the recordset and take suitable code action when "*" is selected, but it all becomes rather messy.

    simpler perhaps is an option group
    (O) All
    (O) Select [Combo]

    combo.visible = true (? or .enabled ?) when option.value = 2

    your report query then uses criteria something like:
    iif(option.value = 1, "*", combo.value)

    izy

  3. #3
    Join Date
    Mar 2003
    Posts
    11
    Jason,

    mvps.org have a clever way of doing it:

    http://www.mvps.org/access/forms/frm0043.htm

    It worked for me.

    Nick

Posting Permissions

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