A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

DCount



 
 
Thread Tools Display Modes
  #1  
Old July 8th, 2009, 11:47 AM posted to microsoft.public.access.queries
zyzzyva
external usenet poster
 
Posts: 31
Default DCount

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])
  #2  
Old July 8th, 2009, 02:45 PM posted to microsoft.public.access.queries
Tom van Stiphout[_2_]
external usenet poster
 
Posts: 1,653
Default DCount

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

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


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])

  #3  
Old July 8th, 2009, 10:55 PM posted to microsoft.public.access.queries
zyzzyva
external usenet poster
 
Posts: 31
Default DCount

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" wrote:

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])

  #4  
Old July 9th, 2009, 01:34 AM posted to microsoft.public.access.queries
John Spencer
external usenet poster
 
Posts: 2,364
Default DCount

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
'================================================= ===


zyzzyva wrote:
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" wrote:

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])

  #5  
Old July 9th, 2009, 01:58 AM posted to microsoft.public.access.queries
zyzzyva
external usenet poster
 
Posts: 31
Default DCount

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" wrote:

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" wrote:

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])

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 10:59 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.