B
bmalak via AccessMonster.com
Having trouble getting dcount to work...
I have a table "providers" with the fields:
provider
[month begin date] (as date)
volume
In a query, want to see the
provider
month
MonthNumber (a sequential count of the months in sequential order)
I've tried but having #Error issues...I've concatenated [provider]&[month
begin date] as these are the "unique" value combinations to initiate a count.
Provider and Month begin date are unique values per row.
select
[provider]
,[month begin date]
,DCount("[provider]&[month begin date]","[providers]","[month begin date]
<=#" & [month begin date] & "#") as MonthNumber
from providers
So, if my data set were
prov1, 1/1/09, 321
prov1, 2/1/09, 456
prov2, 5/1/09, 789
The results would be...
prov1, 1/1/09, 1
prov1, 2/1/09, 2
prov2, 5/1/09, 1
Thanks in advance.
I have a table "providers" with the fields:
provider
[month begin date] (as date)
volume
In a query, want to see the
provider
month
MonthNumber (a sequential count of the months in sequential order)
I've tried but having #Error issues...I've concatenated [provider]&[month
begin date] as these are the "unique" value combinations to initiate a count.
Provider and Month begin date are unique values per row.
select
[provider]
,[month begin date]
,DCount("[provider]&[month begin date]","[providers]","[month begin date]
<=#" & [month begin date] & "#") as MonthNumber
from providers
So, if my data set were
prov1, 1/1/09, 321
prov1, 2/1/09, 456
prov2, 5/1/09, 789
The results would be...
prov1, 1/1/09, 1
prov1, 2/1/09, 2
prov2, 5/1/09, 1
Thanks in advance.