J
jongellar
I saw a post on the MSAceessForum from a week or two ago entitled "coun
if no record, then return zero value." I am having the exact sam
problem that the author of this post was having. However, I did no
fully understand the response. Here is the issue, as it relates to m
situation:
I have a query titled "RESULTS_BY_DATE_qry", which contains a fiel
"Q9". For each record, the value in Q9 can be one of the following:
1, 2, 3, 4, or 99. I wish to count the number of records which each o
the five responses. This is done in another query entitled "Q9_qry"
in which I have the following SQL code: Count(RESULTS_BY_DATE_qry.Q9
AS CountOfQ9. The resulting query looks something like this:
Q9 CountOfQ9
1 86
2 19
3 2
99 1
Obviously, there are only 4 records because there were no records i
"RESULTS_BY_DATE_qry" that had a value of "4" in the "Q9" field.
However, I do not want "Q9_qry" to just skip over that record; rather
I want it to display that there is a count of "0" (zero) for the "4
response.
The suggestion in the previous post was to use the DCount() function
and after investigating what it does, I believe that this would solv
my problem. However, I do not fully understand how this function i
used. In particular, I can't figure out how to set up the "domain
argument (the second argument of the function). Could you pleas
explain in detail how I can set this function up to perform th
operation that I need? I am rather new to Access, so I woul
appreciate as much detail as possible.
Thanks
Jo
if no record, then return zero value." I am having the exact sam
problem that the author of this post was having. However, I did no
fully understand the response. Here is the issue, as it relates to m
situation:
I have a query titled "RESULTS_BY_DATE_qry", which contains a fiel
"Q9". For each record, the value in Q9 can be one of the following:
1, 2, 3, 4, or 99. I wish to count the number of records which each o
the five responses. This is done in another query entitled "Q9_qry"
in which I have the following SQL code: Count(RESULTS_BY_DATE_qry.Q9
AS CountOfQ9. The resulting query looks something like this:
Q9 CountOfQ9
1 86
2 19
3 2
99 1
Obviously, there are only 4 records because there were no records i
"RESULTS_BY_DATE_qry" that had a value of "4" in the "Q9" field.
However, I do not want "Q9_qry" to just skip over that record; rather
I want it to display that there is a count of "0" (zero) for the "4
response.
The suggestion in the previous post was to use the DCount() function
and after investigating what it does, I believe that this would solv
my problem. However, I do not fully understand how this function i
used. In particular, I can't figure out how to set up the "domain
argument (the second argument of the function). Could you pleas
explain in detail how I can set this function up to perform th
operation that I need? I am rather new to Access, so I woul
appreciate as much detail as possible.
Thanks
Jo