Results 1 to 4 of 4
  1. #1
    Join Date
    May 2013
    Posts
    8

    Unanswered: ComboBox Union Query Report Source

    I have a popup form enabling selection of criteria for a report. The report recordsource is a query that contains criteria from the popup form such as

    '[Forms]![frmPrintTimeCards]![cboCrewID]'.

    The form contains two combo boxes, each using a UNION query to allow an 'All' records selection similar to the following:

    SELECT first record selection UNION SELECT "Is Not Null", "(All)" AS Name from tblCrews ORDER BY Name;

    Each combobox shows the All value, and it equates to "Is Not Null" in a query. However when I put [Forms]![frmPrintTimeCards]![cboCrewID] in as a criteria on the report recordsource query and choose 'All' from the combobox (Forms![frmPrintTimeCards]![cboCrewID] value is 'Is Not Null'), the query comes up with no records. FYI, the field I put the criteria in is a text field.
    Last edited by rdperkins; 09-03-13 at 17:15. Reason: clarification

  2. #2
    Join Date
    May 2005
    Location
    Nevada, USA
    Posts
    2,888
    Provided Answers: 6
    I would try having the query return Null for the bound field and use this method:

    Queries: Use a parameter to return all records if Null
    Paul

  3. #3
    Join Date
    May 2013
    Posts
    8

    Talking Thanks - worked great.

    I appreciate your taking time to answer.

    Robert

  4. #4
    Join Date
    May 2005
    Location
    Nevada, USA
    Posts
    2,888
    Provided Answers: 6
    Happy to help!
    Paul

Tags for this Thread

Posting Permissions

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