#Error in DCOUNT

E

erinkate11

Thank you so much! It worked great!

Erin


QUOTE=Duane Hookom]It sounds to me like qry_workorder has paramete
prompts. If this assumption
is correct you will not get this to function. If you want to count the
records in your report where the STH_STATUS field = "Created" then us
the
expression
=Sum(Abs([STH_STATUS] = "Created"))
If this isn't what you want, replace the parameter prompts wit
references
to controls on a form.

--
Duane Hookom
MS Access MVP
--

"erinkate11" [email protected] wrote i
message

I have a report that is based on a query. At the end of this reprt I
would like to have a count based on certain criteria. I am trying to
use the DCount function to do this.

The query, qry_workorder, includes the fields USER_NAME, STH_STATUS,
STH_MOD_USER, and STH_CREATE_DATE, and a user can type in a specific
date range that they want to view. I am based the report on thi
query
and grouped the report by the user. In the Report footer I woul
like
to have a count of all entries where STH_STATUS = 'Created'. Here is
the code I used in a text box in the footer.

=DCount( "*", "qry_workorder", "[STH_STATUS] = 'Created'")

Everytime I do this, I get #Error in the textbox! Help!

Erin
 
Top