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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

filter to less than value which is not zero

Status
Not open for further replies.

ali32j

Technical User
Joined
Apr 23, 2007
Messages
97
Location
GB
Hi All

i am trying to use a query to filter to all values less than £500 but i wish it to exclude the 0 values

my SQL for the filter

HAVING (((Enquiries.[Total Value])<500))

Can anyone help as to what i need to add to ensure all values that are £0.00 are excluded??

Appreciate anyone help

Thanks

Ali
 




Hi,
Code:
HAVING (((Enquiries.[Total Value])<500))
   AND    Enquiries.[Total Value]>0


Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
maybe:

HAVING (((Enquiries.[Total Value])<500) AND ((Enquiries.[Total Value])<>0))

=======================================
People think it must be fun to be a super genius, but they don't realize how hard it is to put up with all the idiots in the world. (Calvin from Calvin And Hobbs)

Robert L. Johnson III
CCNA, CCDA, MCSA, CNA, Net+, A+, CHDP
VB.NET Programmer
 
thanks both, used the second one of the two, worked great thanks
 
It seems the [Total Value] field is not an aggregated value so the filter/criteria would perform better in the WHERE clause rather than the HAVING clause.

Duane
Hook'D on Access
MS Access MVP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top