+ Reply to Thread
Results 1 to 3 of 3

Criteria using "Or" and parameter query

  1. #1
    Troy Man
    Guest

    Criteria using "Or" and parameter query

    Using MS Query, how do you keep an "Or" query and a parameter query on one
    line so that you only need to type in the parameter once.

    For eg. Criteria: Day Date

    Value: 'Monday' or ' Wednesday' or 'Friday' Between [Start
    Date] and

    [End Date]

    After you save this query, MS query automatically formats the query on
    several lines.

    For eg. Criteria: Day Date
    Value: Monday Between [Start Date]
    and [End Date]
    or: Wednesday Between [Start Date]
    and [End Date]
    or: Friday Between [Start
    Date] and [End Date]


  2. #2
    Nick Hodge
    Guest

    Re: Criteria using "Or" and parameter query

    I'm finding it difficult to understand your question but I suspect you can
    add the criteria field to the grid twice, putting the day filter on one that
    you also may not want to show and the parameter query on the other

    If this doesn't work for you then try re-phrasing the question.

    --
    HTH
    Nick Hodge
    Microsoft MVP - Excel
    Southampton, England
    www.nickhodge.co.uk
    [email protected]HIS


    "Troy Man" <Troy [email protected]> wrote in message
    news:[email protected]...
    > Using MS Query, how do you keep an "Or" query and a parameter query on one
    > line so that you only need to type in the parameter once.
    >
    > For eg. Criteria: Day Date
    >
    > Value: 'Monday' or ' Wednesday' or 'Friday' Between [Start
    > Date] and
    >
    > [End Date]
    >
    > After you save this query, MS query automatically formats the query on
    > several lines.
    >
    > For eg. Criteria: Day Date
    > Value: Monday Between [Start
    > Date]
    > and [End Date]
    > or: Wednesday Between [Start Date]
    > and [End Date]
    > or: Friday Between [Start
    > Date] and [End Date]
    >




  3. #3
    Troy Man
    Guest

    Re: Criteria using "Or" and parameter query

    Nick,
    I have tried to put the criteria in the grid twice. However when you select
    "or" the field selection goes down the page, which means that I now need to
    enter a parameter (date range) for each field I need to query. Access lets
    your "or" query go across the page.

    Any ideas?

    "Nick Hodge" wrote:

    > I'm finding it difficult to understand your question but I suspect you can
    > add the criteria field to the grid twice, putting the day filter on one that
    > you also may not want to show and the parameter query on the other
    >
    > If this doesn't work for you then try re-phrasing the question.
    >
    > --
    > HTH
    > Nick Hodge
    > Microsoft MVP - Excel
    > Southampton, England
    > www.nickhodge.co.uk
    > [email protected]HIS
    >
    >
    > "Troy Man" <Troy [email protected]> wrote in message
    > news:[email protected]...
    > > Using MS Query, how do you keep an "Or" query and a parameter query on one
    > > line so that you only need to type in the parameter once.
    > >
    > > For eg. Criteria: Day Date
    > >
    > > Value: 'Monday' or ' Wednesday' or 'Friday' Between [Start
    > > Date] and
    > >
    > > [End Date]
    > >
    > > After you save this query, MS query automatically formats the query on
    > > several lines.
    > >
    > > For eg. Criteria: Day Date
    > > Value: Monday Between [Start
    > > Date]
    > > and [End Date]
    > > or: Wednesday Between [Start Date]
    > > and [End Date]
    > > or: Friday Between [Start
    > > Date] and [End Date]
    > >

    >
    >
    >


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1