DCount

Z

zyzzyva

I use Access 2007

The following works fine, until the counting goes 10 and above

I want it the "CD" counted Ascending 1...8,9, 10, 11 and so on

What do I need to add to make it count in order from 10 and above

Enum: DCount("StuGenIndex","qryS12","CD=" & [CD] & " AND [StuGenIndex]<=" &
[StuGenIndex])
 
T

Tom van Stiphout

On Wed, 8 Jul 2009 03:47:02 -0700, zyzzyva

Enum is a reserved word; I would not use it for a column name.

Other than that, I cannot follow your question.

-Tom.
Microsoft Access MVP
 
Z

zyzzyva

I changed "enum"

What I need is to make the qry code count those who are in various "CD"
categories, which it does up to a point as long as the count stops at 9

When a CD status goes 10 and above, the counting no longer is in sequence,
as say 1 through 20

It goes 1, then 10 say to 20, then picks back up with 2 through 9

I want the count to go from 1 to 20 (or whatever the count is above 9) in
count
 
J

John Spencer

That is strange since DCount should be returning a number. And if you
sort by the number returned you should have the records in number order.

Are you applying format to the number and trying to sort by the
formatted number? Using the format function turns a number into a
string and then you will get the sort order you mentioned since "11" (a
string) sorts before "2", while 11 (a number) sorts after 2.

'====================================================
John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
'====================================================

I changed "enum"

What I need is to make the qry code count those who are in various "CD"
categories, which it does up to a point as long as the count stops at 9

When a CD status goes 10 and above, the counting no longer is in sequence,
as say 1 through 20

It goes 1, then 10 say to 20, then picks back up with 2 through 9

I want the count to go from 1 to 20 (or whatever the count is above 9) in
count

zyzzyva said:
I use Access 2007

The following works fine, until the counting goes 10 and above

I want it the "CD" counted Ascending 1...8,9, 10, 11 and so on

What do I need to add to make it count in order from 10 and above

Enum: DCount("StuGenIndex","qryS12","CD=" & [CD] & " AND [StuGenIndex]<=" &
[StuGenIndex])
 
Z

zyzzyva

I am sure you are correct in your assessment

I went to the tbl this qry uses and changed "CD" to text, but, of course, it
messes up DCount it seems (I get an error msg), so I need to make my
expression "understand" to count "CD" as Text and no longer numbers, so it
seem

Do you see a possible update to my expression to account for this?

zyzzyva said:
I changed "enum"

What I need is to make the qry code count those who are in various "CD"
categories, which it does up to a point as long as the count stops at 9

When a CD status goes 10 and above, the counting no longer is in sequence,
as say 1 through 20

It goes 1, then 10 say to 20, then picks back up with 2 through 9

I want the count to go from 1 to 20 (or whatever the count is above 9) in
count

zyzzyva said:
I use Access 2007

The following works fine, until the counting goes 10 and above

I want it the "CD" counted Ascending 1...8,9, 10, 11 and so on

What do I need to add to make it count in order from 10 and above

Enum: DCount("StuGenIndex","qryS12","CD=" & [CD] & " AND [StuGenIndex]<=" &
[StuGenIndex])
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Access Dcount (multiple criteria) 3
dcount in a crosstab query 3
Dcount returning no results!!! 0
DCount in query 3
sorting a Dcount field 14
Count query help 3
Access MS Access DCount function problem 0
Running Sum in Query for Count Field 0

Top