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!

count my field

Status
Not open for further replies.

beneidas

Programmer
Jan 28, 2005
6
CA
Hi all!!!

I have a table with a field "date" with this occurence:
"Date"
01/04/2004
01/04/2004
01/05/2004
01/05/2004
01/05/2004
01/06/2004

In my report I must calculate the number of the occurence, but only one time

so I need its write 3 but I got 6

I try =count([Date])

can anyone help please?

btw sorry for my english...I'm french :p
 
You can do this in two queries. First perform a distinct query and then do your count based on the distinct query.
 
thx for the help but I have a another problem now
when I enter in my report access demand a parameter for ma second query...but I have no parameter to send

how canI use 2 query's in one report?
 
If Access is asking for a parameter and you did not put the parameter there yourself, that means that in one of the queries, you have a f9ield that Access does not recognize. In other words, the field that it is requesting a parameter for is not in your tables. You need to go back and find that field and correct the spelling.
 
but I use the generator expression

I suppose he reconize the mane automaticaly

anyway I check and it the good name

 
If that is all that you need, you can:

Select Date, Count(Date) as Countofdate
from ...
Group By Date;

traingamer
 
Or, since you're using this in a report, use 'Sorting and Grouping' to consolidate your data. You probably still want to 'Group By' the date.

traingamer
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top