Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Query Help

Status
Not open for further replies.

Aaron36

Technical User
Mar 15, 2002
33
US
Hi,
PLease look at this senario.

Table 1 Form(User Types In)
Low_Price High_Price Low Price High Price
595 675 595
550 600

Here is part of what I'm using

Low_Price >=varLow_Price AND High_Price <= varHigh_Price

How would I write a query that would select the unit if the user puts in 595 in the high price end?

Thanks for any help.
 
criterion range
<----------------------->

various target ranges
<--------->
<--------->
<--------->

So

Code:
High_Price >=varLow_Price AND High_Price <= varHigh_Price

OR

Low_Price >=varLow_Price AND High_Price <= varHigh_Price

OR

Low_Price >=varLow_Price AND Low_Price <= varHigh_Price
 
I came up with this before I read your response. What do you think?
Last Part of statement
( Low_Price>= varLow_Price) AND (varHigh_Price Between Low_Price AND High_Price OR High_Price<=varHigh_Price)

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top