Results 1 to 3 of 3
  1. #1
    5 Star Lounger
    Join Date
    Jan 2005
    Posts
    614
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Is Multi criteria ok to use (Access2000-03)

    Hello everybody.
    Another crazy question from me!

    I am trying not to re-write query per each Report and have all of the Reports run off the same query.

    However when I had added 2nd criteria look what happened...is this how it is suppose to be?

    SELECT Active_ALL.Region, Active_ALL.[Office name], Active_ALL.T9_LOB, Active_ALL.NAME_DISPLAY, Active_ALL.SumOfAVAIL_OPENING, Active_ALL.STATUS_CODE, Active_ALL.FULL_PART_TIME, Active_ALL.T9_REPL_EXTENSION
    FROM Active_ALL
    WHERE (((Active_ALL.Region)=[Forms]![Reports_Switchboard]![cmb_Region]) AND ((Active_ALL.NAME_DISPLAY)=[Forms]![Reports_Switchboard]![cmb_NAME])) OR (((Active_ALL.NAME_DISPLAY)=[Forms]![Reports_Switchboard]![cmb_NAME]) AND (([Forms]![Reports_Switchboard]![cmb_Region]) Is Null)) OR (((Active_ALL.Region)=[Forms]![Reports_Switchboard]![cmb_Region]) AND (([Forms]![Reports_Switchboard]![cmb_NAME]) Is Null)) OR ((([Forms]![Reports_Switchboard]![cmb_Region]) Is Null) AND (([Forms]![Reports_Switchboard]![cmb_NAME]) Is Null));

    My concern is the look of this query. Can I simplify or it is ok like this? It seems working fine...

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

    Re: Is Multi criteria ok to use (Access2000-03)

    The SQL looks complicated because Access rearranges the criteria and add lots of extra parentheses, but apart from that it appears to be OK.

  3. #3
    5 Star Lounger
    Join Date
    Jan 2005
    Posts
    614
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Is Multi criteria ok to use (Access2000-03)

    Thanks! Funny Access!

Posting Permissions

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