Results 1 to 5 of 5
  1. #1
    billmark is offline Novice
    Windows 10 Access 2010 64bit
    Join Date
    Aug 2016
    Posts
    13

    Add ALL in the combo box

    Hi
    I created a combo box in the form to select ALL record and export to excel (I created a button). I researched a lot in the web but still can't work.

    What I have add the following in the Row Source of the Property sheet of the unbound combo box.

    Select “ALL” FROM qryClient UNION Select clt.Field1 FROM qryClient GROUP BY clt.Field1

    It prompts to ask to Enter the Parameter.



    Please help how to fix.


  2. #2
    davegri's Avatar
    davegri is online now Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    2,351
    Code:
    Select “ALL” FROM qryClient UNION Select clt.Field1 FROM qryClient GROUP BY clt.Field1
    What are the red qualifiers? Try it without those.
    Also, I think the Union should be the other way around and probably not Group By but Order By
    Code:
    Select Field1 from qryClient UNION Select "ALL" from qryClient Order By Field1
    Last edited by davegri; 11-18-2019 at 08:50 PM. Reason: format damn it

  3. #3
    billmark is offline Novice
    Windows 10 Access 2010 64bit
    Join Date
    Aug 2016
    Posts
    13
    The ALL has been added in the combo box. When I selected ALL and click the export button, no data was generated. Is there something I missed.

    In the query, I added the criteria: '[forms]![main]![cbofield1] or [forms]![main]![cbofield1] is null'. Does it matter or what is the correct approach.

  4. #4
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    7,124

  5. #5
    davegri's Avatar
    davegri is online now Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    2,351
    When I selected ALL and click the export button, no data was generated. Is there something I missed.
    How would I know? I have no idea what code is behind the export button.

    In the query, I added the criteria: '[forms]![main]![cbofield1] or [forms]![main]![cbofield1] is null'. Does it matter or what is the correct approach.
    What query? You don't provide enough information to get a cogent reply.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 5
    Last Post: 09-22-2016, 08:42 AM
  2. Replies: 11
    Last Post: 09-03-2015, 11:12 AM
  3. Replies: 2
    Last Post: 10-21-2014, 07:57 AM
  4. Replies: 1
    Last Post: 10-30-2012, 10:29 AM
  5. Replies: 4
    Last Post: 08-16-2011, 05:54 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums - Senior Forums