DCount Question

K

knowshowrosegrows

I have the following code in the ControlSource Property of a text box in a
report.

=DCount("[RecordID]","[Denial Specific
Info]","[First_Level_Appeal_Determinations]=Denied")

I want it to Count the number of records that have "Denied" in the
First_Level_Appeal_Determinations field. I have tried this every way I can
try it and i am obviously missing something.
 
E

Eric Blitzer

Try putting single quotes around 'Denied'
=DCount("[RecordID]","[Denial Specific
Info]","[First_Level_Appeal_Determinations]='Denied'")
 
K

knowshowrosegrows

Thank you - So obvious once it is pointed out...
--
Thanks


Eric Blitzer said:
Try putting single quotes around 'Denied'
=DCount("[RecordID]","[Denial Specific
Info]","[First_Level_Appeal_Determinations]='Denied'")



knowshowrosegrows said:
I have the following code in the ControlSource Property of a text box in a
report.

=DCount("[RecordID]","[Denial Specific
Info]","[First_Level_Appeal_Determinations]=Denied")

I want it to Count the number of records that have "Denied" in the
First_Level_Appeal_Determinations field. I have tried this every way I can
try it and i am obviously missing something.
 
K

knowshowrosegrows

Since you were so quick and so helpful... I see how I can put the DCount
Control for the "Granted" records. How would I have a user defined date
range that would apply to these questions. I imagine I am going to create a
switchboard. Would I have a button run a macro that would request the date
range and then create the report?
--
Thanks


Eric Blitzer said:
Try putting single quotes around 'Denied'
=DCount("[RecordID]","[Denial Specific
Info]","[First_Level_Appeal_Determinations]='Denied'")



knowshowrosegrows said:
I have the following code in the ControlSource Property of a text box in a
report.

=DCount("[RecordID]","[Denial Specific
Info]","[First_Level_Appeal_Determinations]=Denied")

I want it to Count the number of records that have "Denied" in the
First_Level_Appeal_Determinations field. I have tried this every way I can
try it and i am obviously missing something.
 
K

knowshowrosegrows

My next question - I have five total test records in my [Denial Specific
Table]. Four are granted and 1 is denied. Why, when I run the code you gave
me do I get the right answer of 1 but I get the text box duplicated 5 times
down the page? I also put a text box in for "granted" records and it also
duplicates 5 times down the page.
--
Thanks


Eric Blitzer said:
Try putting single quotes around 'Denied'
=DCount("[RecordID]","[Denial Specific
Info]","[First_Level_Appeal_Determinations]='Denied'")



knowshowrosegrows said:
I have the following code in the ControlSource Property of a text box in a
report.

=DCount("[RecordID]","[Denial Specific
Info]","[First_Level_Appeal_Determinations]=Denied")

I want it to Count the number of records that have "Denied" in the
First_Level_Appeal_Determinations field. I have tried this every way I can
try it and i am obviously missing something.
 
M

Marshall Barton

knowshowrosegrows said:
I have the following code in the ControlSource Property of a text box in a
report.

=DCount("[RecordID]","[Denial Specific
Info]","[First_Level_Appeal_Determinations]=Denied")

I want it to Count the number of records that have "Denied" in the
First_Level_Appeal_Determinations field. I have tried this every way I can
try it and i am obviously missing something.


When you use a text string in a criteria, it must be
enclosed in quotes:

=DCount("RecordID","Denial Specific Info",
"First_Level_Appeal_Determinations='Denied' ")
 

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

Top