Results 1 to 6 of 6
  1. #1
    logle0917 is offline Novice
    Windows XP Access 2007
    Join Date
    Mar 2012
    Posts
    16

    General Questions re an Existing Report Creteria Example attached.

    I need to edit some creteria on existing reports. I am confused as to why the creator of these reports put the creteria on several different lines instead of once on one line like in and In (list) or Like or Between Dates. Is there some type of reason for doing this in MS Access or can I do one line Creteria and what would be to purpose of doing it the way that it is shown on the attachment here. Thanks!!!




    Lisa

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    No attachment, but in the actual SQL that the query designer creates, items on the same line are separated by "And", while items on different lines are separated by "Or". Big difference in the resulting logic.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    logle0917 is offline Novice
    Windows XP Access 2007
    Join Date
    Mar 2012
    Posts
    16

    General Questions Hopefully the attachment works now.

    Ima try to add the attachment again I do SQL and looking at the Access Editor in design view does not make sense to me. Why several Date ranges why not just one Between Dates?
    Attached Files Attached Files

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    That is a pretty complicated query, but generally they are trying to achieve:

    WHERE (A And Date) Or (A And C)

    if the date didn't appear on every line you'd get

    WHERE (A And Date) Or (C)

    so the date restriction wouldn't be applied along with C. It may help if you visualize that all criteria on the first line must be met, OR all criteria on the second line, etc. If the date wasn't on a given line, it wouldn't be included in the restrictions for that line.

    By the way, in SQL view you could write it so it only appeared once, but the design grid will often change it so it can visually represent it to you.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    logle0917 is offline Novice
    Windows XP Access 2007
    Join Date
    Mar 2012
    Posts
    16
    Thanks that helps! Seems like it would have been simpler to just write this in a SQL Query.

  6. #6
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Happy to help, and welcome to the site! SQL can be cleaner. The design view is an effort to make SQL more visual for beginners, but it can also confuse matters.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. A few general questions...
    By Daryl2106 in forum Access
    Replies: 3
    Last Post: 02-29-2012, 09:57 PM
  2. General Questions about Access 2010
    By jack0987 in forum Access
    Replies: 2
    Last Post: 01-29-2012, 01:09 AM
  3. General Access questions - can or cannot
    By Armitage2k in forum Access
    Replies: 2
    Last Post: 11-28-2011, 07:28 PM
  4. Querry general questions
    By newtoAccess in forum Access
    Replies: 2
    Last Post: 04-04-2011, 06:56 PM
  5. General Questions about a Switchboard
    By yes sir in forum Access
    Replies: 2
    Last Post: 09-23-2010, 11:28 AM

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