A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

How to set the parameter query for this case?



 
 
Thread Tools Display Modes
  #1  
Old June 7th, 2010, 03:55 AM posted to microsoft.public.access.queries
klim1167 via AccessMonster.com
external usenet poster
 
Posts: 2
Default How to set the parameter query for this case?

Dear all,
I have 2 fields, Eng and Math.
I would like to set the parameter query for Eng and Math == Eng min, Eng max,
Math min and Math max.
The Eng query criteria can be "Between Eng min AND Eng max" and the Math
query criteria can be "Between Math min AND Math max".
But...if I would it can be allowed to have "Null entry", how can I set the
Eng and Math query criteria?
Please kindly help me, thanks a lot!!

All combinations will be like...
Eng : Between Eng min AND Eng max, Between Null AND Eng max, Between Eng min
AND Null, Between Null AND Null
Math : Between Math min AND Math max, Between Null AND Math max, Between Math
min AND Null, Between Null AND Null

--
Message posted via http://www.accessmonster.com

Ads
  #2  
Old June 7th, 2010, 12:42 PM posted to microsoft.public.access.queries
Marshall Barton
external usenet poster
 
Posts: 5,361
Default How to set the parameter query for this case?

klim1167 via AccessMonster.com wrote:
I have 2 fields, Eng and Math.
I would like to set the parameter query for Eng and Math == Eng min, Eng max,
Math min and Math max.
The Eng query criteria can be "Between Eng min AND Eng max" and the Math
query criteria can be "Between Math min AND Math max".
But...if I would it can be allowed to have "Null entry", how can I set the
Eng and Math query criteria?
Please kindly help me, thanks a lot!!

All combinations will be like...
Eng : Between Eng min AND Eng max, Between Null AND Eng max, Between Eng min
AND Null, Between Null AND Null
Math : Between Math min AND Math max, Between Null AND Math max, Between Math
min AND Null, Between Null AND Null



Try using a Where clause like:

WHERE (Eng = EngMin Or EngMin Is Null) And (Eng = EngMax
Or EngMax Is Null)

--
Marsh
MVP [MS Access]
  #3  
Old June 7th, 2010, 02:30 PM posted to microsoft.public.access.queries
Krzysztof Naworyta
external usenet poster
 
Posts: 80
Default How to set the parameter query for this case?

klim1167 via AccessMonster.com wrote:
| Dear all,
| I have 2 fields, Eng and Math.
| I would like to set the parameter query for Eng and Math == Eng min,
| Eng max, Math min and Math max.
| The Eng query criteria can be "Between Eng min AND Eng max" and the
| Math query criteria can be "Between Math min AND Math max".
| But...if I would it can be allowed to have "Null entry", how can I
| set the Eng and Math query criteria?
| Please kindly help me, thanks a lot!!
|
| All combinations will be like...
| Eng : Between Eng min AND Eng max, Between Null AND Eng max, Between
| Eng min AND Null, Between Null AND Null
| Math : Between Math min AND Math max, Between Null AND Math max,
| Between Math min AND Null, Between Null AND Null

(...)
Eng Between Nz([Eng Min],0) and Nz([Eng Max], Eng)
AND
Math Between Nz([Math min],0) and Nz([Math max], 200000000)



--
KN
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 08:30 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright 2004-2017 OfficeFrustration.
The comments are property of their posters.