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

COUNT NUMBER OF ITEM IN TABLE

Status
Not open for further replies.

pelagic

Programmer
Nov 7, 2002
97
US
hi All,
I have Access table named tblCatDog, which included the following:
SUB CATEGORY PRICE BEFORE PRICE AFTER
CAT 100 200
CAT 105 200
CAT 150 200
CAT 250 200
CAT 300 200
DOG 400 500
DOG 450 500
DOG 550 500
How would I count number of price under price and over price.
CAT under price would be 3
CAT over price would be 2
DOG under price would be 2
DOG over price would be 1

thanks for your time,
regards
 
This is the wrong forum for this question. Please post in Access Queries and JetSQL.

Also, your question is not clear. You don't explain what Under Price and Over Price are. Which price are you talking about?
 
Just add text boxes:
=Sum(Abs([Price After]<[Price Before] AND [Sub Category]=&quot;CAT&quot;))
=Sum(Abs([Price After]>[Price Before] AND [Sub Category]=&quot;CAT&quot;))
=Sum(Abs([Price After]<[Price Before] AND [Sub Category]=&quot;DOG&quot;))
=Sum(Abs([Price After]>[Price Before] AND [Sub Category]=&quot;DOG&quot;))
If there would ever be more than just cats and dogs, then you might be better off creating a subreport.

Duane
MS Access MVP
Find out how to get great answers faq219-2884.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top