Results 1 to 2 of 2
  1. #1
    Join Date
    May 2012

    Unanswered: Simple Query question

    Hi. I try to make a query sorting out some records from selection of a combobox. This works fine. However I like to add that the criteria in query add a checkbox as well. So this is how it should work:
    Select combobox if checkbox is checked.

    How to do this?

    This is my criteria without checkbox: [Forms]![GlobalPunchList Form]![Combo17]
    So i like to add checkbox as well to this criteria. Any tip?


  2. #2
    Join Date
    Jan 2002
    Bay Area
    You can test the check box value (either True or False) from your query. The attached AC 2003
    demo form may help in finding your solution. If the check box is checked , the query filters on the
    value selected in the combo, otherwise there is no filtering on the combo value.

    Query SQLView syntax example:
    SELECT Table1.MyField1, Table1.MyField2
    WHERE (((Table1.MyField1)=IIf([Forms]![Form1]![chkMyCheckBox]=True,[Forms]![Form1]![cboMyCombo],[MyField1])));
    Attached Files Attached Files

Posting Permissions

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