I have a field named --> [OneA], the user will either leave the box blank or they can enter 1 or 2. I would like to count the one's and two's in a report. I created an unbound text box in my report. I entered the following expression. I am not getting correct numbers. Any ideas?
Probably the most straightforward way is to use report grouping. Add a grouping level for [onea] and add a footer for this group. Then add [onea] as an identifier and an unbound field count([onea]). You can also add some text fields for explanation like “total for…”
The result if you include the detail will be:
Total for 1 is 3
Total for 2 is 4
If you don’t want to add the counts in at group levels (say if you want a summarised report footer), then check out the DCount() function again.
Why not just create a query group by the [onea] and then count the [onea]
the sql woul look something like
SELECT Table1.Onea, Count(Table1.Onea) AS CountOfOnea
GROUP BY Table1.Onea;
then create the report.
hope this help
See clear as mud
the aim is store once, not store multiple times
Remember... Optimize 'til you die!
Progaming environment: Access based on my own environment: DAO3.6/A97/A2000/A2003/A2007/A2010 VB based on my own environment: vb6 sp5 ASP based on my own environment: 5.6 VB-NET based on my own environment started 2007 SQL-2005 based on my own environment started 2008 MYLE YOUR PASSWORD IS JUST LIKE YOUR TOOTHBRUSH DON'T SHARE IT.