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

help with query issues

Status
Not open for further replies.

aquinox

Programmer
Jul 2, 2007
38
AU
Hi,

I was wondering if anyone might be able to help me with query issue.

Here is my query.

SELECT ...
Format(60000+700*(([WindTime]-[NewTimeToSpill])*[GHD PDWF]),"$0"),"0") AS BladderSize, 30+(DLookUp("[WindTime]","[Locations]","Location='" & [Location] & "'")) AS WindTime, [Pump Stations].Location, [BladderSize]-[Budget for Store] AS Expr1
FROM [Pump Stations]
WHERE ((([Pump Stations].[Not Assesed])=False) AND (([Pump Stations].[Insufficiant Data])=False));

There is nothing wrong with that. it's just that i'm getting lots of zeroes (0) value for Expr1. What i'd like to do is filter this Expr1 so that i don't get to see the zeros (0) in the result. I tried to put in "<> 0" in the criteria, it kept asking for BladderSize. I have also tried "<> '0'". This didn't work either.

Thank you in advance
 
This has unbalanced parens
Format(60000+700*(([WindTime]-[NewTimeToSpill])*[GHD PDWF]),"$0"),"0") AS BladderSize and I don't understand the quoted stuff at the end.

Also, I never use a derived field name in another expression which you did with BladderSize and WindTime. I always duplicate the expression rather than using the derived column name.

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top