Results 1 to 4 of 4
  1. #1
    Silver Lounger
    Join Date
    Jan 2002
    Posts
    1,615
    Thanks
    0
    Thanked 1 Time in 1 Post

    Query Help (2002)

    Hi,

    I have a query that contains a field [active] which contains yes/no answers. I'm trying to filter the query based on form. I need to query to filter the "yes" records when that option is selected on the form and if yes is not the desired result, than all records should show. This is what I have:
    =IIf([forms]![frmExportStoreDemotoExcel]![cmbActive]="yes",True)

    It works fine however every option I've tried in the "else" position either returns only the false records or an error. I need to know what to put in this formula to show all records when nothing is selected.

    Thanks!
    Leesha

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Query Help (2002)

    Try this:

    =([Forms]![frmExportStoreDemotoExcel]![cmbActive]="Yes") Or Not ([Forms]![frmExportStoreDemotoExcel]![cmbActive]="Yes")

  3. #3
    Silver Lounger
    Join Date
    Jan 2002
    Posts
    1,615
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Query Help (2002)

    Thanks Hans! I've never used "or not" before. I've added it to my bag of "Han's Tricks".

    Leesha

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Query Help (2002)

    There's a first time for everything. Or not... <img src=/S/grin.gif border=0 alt=grin width=15 height=15>

Posting Permissions

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