DCount help

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a report where I am using the DCount in the report footer in an
unbound control to count certain criteria in a field [Formal Discovery by
us:].
It worked for all of the answers in that field except for when "Other: " is
entered.
Here's what I have:
=DCount("[Formal Discovery by us:]","Sorted by Last name 2005LCCR","[Formal
Discovery by us:] = 'Other:' ")
The only thing I can think of is that when "Other: " is chosen, the user may
also type something with that for example, "Other: discovery not listed".
I thought that maybe a wildcard would solve this, but where would I put in in
the expression that it would pick up every answer that begins with 'Other:'

Any help would be greatly appreciated.
Please keep in mind that I have very limited knowledge of Access.
 
Try to put the name of the table in square brackets

=DCount("[Formal Discovery by us:]","[Sorted by Last name 2005LCCR]","[Formal
Discovery by us:] = 'Other:'")
 
That didn't work, but thank you for the suggestion. It still comes up with
a count of zero. There should be a count of 6 for 'Other:'. Any ideas of
what else might solve the problem?
Would it not count 'Other:' if something else was typed after the other?
Is there a wildcard character I could use to solve this with?

Thank you very much for your help.

Ofer said:
Try to put the name of the table in square brackets

=DCount("[Formal Discovery by us:]","[Sorted by Last name 2005LCCR]","[Formal
Discovery by us:] = 'Other:'")

--
If I answered your question, please mark it as an answer. That way, it will
stay saved for a longer time, so other can benifit from it.

Good luck



limited computer knowledge said:
I have a report where I am using the DCount in the report footer in an
unbound control to count certain criteria in a field [Formal Discovery by
us:].
It worked for all of the answers in that field except for when "Other: " is
entered.
Here's what I have:
=DCount("[Formal Discovery by us:]","Sorted by Last name 2005LCCR","[Formal
Discovery by us:] = 'Other:' ")
The only thing I can think of is that when "Other: " is chosen, the user may
also type something with that for example, "Other: discovery not listed".
I thought that maybe a wildcard would solve this, but where would I put in in
the expression that it would pick up every answer that begins with 'Other:'

Any help would be greatly appreciated.
Please keep in mind that I have very limited knowledge of Access.
 
Try this to use a wildcard:

=DCount("[Formal Discovery by us:]","Sorted by Last name 2005LCCR","[Formal
Discovery by us:] Like 'Other:*' ")

--

Ken Snell
<MS ACCESS MVP>

"limited computer knowledge"
 
Thanks, Ken! That suggestion worked great!
I appreciate the help.

Ken Snell said:
Try this to use a wildcard:

=DCount("[Formal Discovery by us:]","Sorted by Last name 2005LCCR","[Formal
Discovery by us:] Like 'Other:*' ")

--

Ken Snell
<MS ACCESS MVP>

"limited computer knowledge"
I have a report where I am using the DCount in the report footer in an
unbound control to count certain criteria in a field [Formal Discovery by
us:].
It worked for all of the answers in that field except for when "Other: "
is
entered.
Here's what I have:
=DCount("[Formal Discovery by us:]","Sorted by Last name
2005LCCR","[Formal
Discovery by us:] = 'Other:' ")
The only thing I can think of is that when "Other: " is chosen, the user
may
also type something with that for example, "Other: discovery not
listed".
I thought that maybe a wildcard would solve this, but where would I put in
in
the expression that it would pick up every answer that begins with
'Other:'

Any help would be greatly appreciated.
Please keep in mind that I have very limited knowledge of Access.
 
Back
Top