Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!
  1. Monthly (Recurring) Target: $300 :: Achieved: $95   Become a Supporter    ::   Make a Contribution    Let's do it!

Selection criteria

Discussion in 'Information Technology' started by PE, Nov 19, 2005.

  1. PE

    PE
    Expand Collapse
    Guest

    I have created a query and would like to select records based on the
    following criteria:

    Select all records where the field has "holiday" or "vacation" but exclude
    those which have "public holiday".

    Is it possible to put the criteria on one line or would I have to use two
    lines -
    Like "Holiday*" And Not Like "Public Holiday*"
    Like "vacation*"

    Al
     
  2. Loading...


  3. Brendan Reynolds

    Brendan Reynolds
    Expand Collapse
    Guest

    (Like "Holiday*" And Not Like "Public Holiday*") Or Like "vacation*"

    Access may well change that to two criteria rows the next time you open it
    in design view, though. The query designer does that sometimes, and as far
    as I know there isn't any way to stop it, short of never opening the query
    in design view.

    I'm not sure that it really makes any difference in this scenario, though?

    --
    Brendan Reynolds


    "PE" <pitsofearth@msn.com> wrote in message
    news:%23msGLUC7FHA.1032@TK2MSFTNGP11.phx.gbl...
    >I have created a query and would like to select records based on the
    > following criteria:
    >
    > Select all records where the field has "holiday" or "vacation" but exclude
    > those which have "public holiday".
    >
    > Is it possible to put the criteria on one line or would I have to use two
    > lines -
    > Like "Holiday*" And Not Like "Public Holiday*"
    > Like "vacation*"
    >
    > Al
    >
    >
     
  4. PE

    PE
    Expand Collapse
    Guest

    Yes Access does change the criteria to two row.

    The problem I had with two rows was that I had to key in dates to and from
    (to select records between certain dates) twice, but after doing what you
    suggested I only have to key in the dates once, even though Access has split
    the criteria to two rows!!

    Thanks for your help.


    "Brendan Reynolds" <brenreyn@discussions.microsoft.com> wrote in message
    news:%237diLfC7FHA.3660@TK2MSFTNGP09.phx.gbl...
    (Like "Holiday*" And Not Like "Public Holiday*") Or Like "vacation*"

    Access may well change that to two criteria rows the next time you open it
    in design view, though. The query designer does that sometimes, and as far
    as I know there isn't any way to stop it, short of never opening the query
    in design view.

    I'm not sure that it really makes any difference in this scenario, though?

    --
    Brendan Reynolds


    "PE" <pitsofearth@msn.com> wrote in message
    news:%23msGLUC7FHA.1032@TK2MSFTNGP11.phx.gbl...
    >I have created a query and would like to select records based on the
    > following criteria:
    >
    > Select all records where the field has "holiday" or "vacation" but exclude
    > those which have "public holiday".
    >
    > Is it possible to put the criteria on one line or would I have to use two
    > lines -
    > Like "Holiday*" And Not Like "Public Holiday*"
    > Like "vacation*"
    >
    > Al
    >
    >
     
Since you're here... we have a small favor to ask...

More people are visiting & reading SPN than ever but far fewer are paying to sustain it. Advertising revenues across the online media have fallen fast. So you can see why we need to ask for your help. Donating to SPN's is vote for free speech, for diversity of opinions, for the right of the people to stand up to religious bigotry. Without any affiliation to any organization, this constant struggle takes a lot of hard work to sustain as we entirely depend on the contributions of our esteemed writers/readers. We do it because we believe our perspective matters – because it might well be your perspective, too... Fund our efforts and together we can keep the world informed about the real Sikh Sikhi Sikhism. If everyone who writes or reads our content, who likes it, helps us to pay for it, our future would be much more secure. Every Contribution Matters, Contribute Generously!

    Become a Supporter      ::     Make a Contribution     



Share This Page