Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Troy Man
 
Posts: n/a
Default 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   Report Post  
Posted to microsoft.public.excel.misc
Nick Hodge
 
Posts: n/a
Default 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
HIS


"Troy Man" <Troy
wrote in message
...
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   Report Post  
Posted to microsoft.public.excel.misc
Troy Man
 
Posts: n/a
Default 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
HIS


"Troy Man" <Troy
wrote in message
...
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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Linking parameter query from Access to pivot table in Excel ken1975 Excel Discussion (Misc queries) 2 June 20th 06 01:51 PM
Parameter Query in MS Query Dan41591 Excel Discussion (Misc queries) 0 October 19th 05 03:51 PM
parameter query - multiple options GregCrossan Excel Discussion (Misc queries) 0 September 22nd 05 08:04 PM
How do i enable the Query Parameter menu option on the External D. Saleha Excel Discussion (Misc queries) 0 August 23rd 05 09:28 AM
How to use a Access Query that as a parameter into Excel database query Karen Middleton Excel Discussion (Misc queries) 1 December 13th 04 07:54 PM


All times are GMT +1. The time now is 05:23 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"