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

IIf Criteria not working right 2

Status
Not open for further replies.

blubomber

MIS
Dec 27, 2001
241
US
I am trying to find out how many people have earned 10 or more points for a given day. If the earn the 10 or more points, i want a 2 to be the result, if not then a 0 or nothing.

If i use just >=10 in my query, i get the the expected number of results with the number of points showing. when i use IIf(>=10,2,0) then i get a smaller number of returns with all 0s when there should be a 2.

What i really want is that if points earned is equal or more than 10, then the result being a 2. If the criteria is not met, i dont want any return.

Any help is greatly appreciated.
 
You need two things for this.

You need an extra column to show the value 2.
myresult:2

And you need your original criteria >=10 in the points column.
 
Thank you for the quick response. I did forget to mention that i am using Access 2000 queries. would your suggestion still apply?
 
Excellent! both of your responses were very helpfull. the suggestion by lupins46 was just what i was looking for.

Thank you again for the quick replies.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top