Using Dcount function based on an access parameter query

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

Guest

I want to use Dcount in an access report but it is based on an access
parameter query and doesn't work. Works fine in an non parameter query so
what do I need to do differently to get it to work in a parameter query?
 
Try declaring the parameter type.

Open the query in design mode
Select Query: Parameters from the Menu
Fill in the EXACT name of the parameter in column 1
Select the data type of the parameter in column 2
 
I don't believe it is possible to use a parameter query as the "domain" in a
DCount() function. What are you attempting to accomplish?

Is the "domain" the same as your report's record source? If so, you can
probably use a simple =Count() or =Sum().

You might also be able to replace the query name in your domain with
[RecordSource].
 
Probably bad advice on my part. I misunderstood what you are attempting to
do.

--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..
 
Thank you for all your responses. Solved the problem by using the Sum(Abs)
function.

Duane Hookom said:
I don't believe it is possible to use a parameter query as the "domain" in a
DCount() function. What are you attempting to accomplish?

Is the "domain" the same as your report's record source? If so, you can
probably use a simple =Count() or =Sum().

You might also be able to replace the query name in your domain with
[RecordSource].

--
Duane Hookom
Microsoft Access MVP


Kiltedkiwi said:
I want to use Dcount in an access report but it is based on an access
parameter query and doesn't work. Works fine in an non parameter query so
what do I need to do differently to get it to work in a parameter query?
 
Back
Top