R
Rachel
Hi,
I keep getting an error message in my adp report when I try to use a
stored procedure as the domain in a dcount formula , however when i
use a view instead it works fine
This is the dcount that works:
=DCount("[Client_ID]","vw_ClientDetails"," [Gender] = 'male' AND
[Ethnic ID] = '1'")
This is the one that doesn't:
=DCount("[Client_ID]","sp_EthnicReport"," [Gender] = 'male' AND
[Ethnic ID] = '1'")
When i execute the sp_ethnicreport it works fine but when i enter it
into the control source (as dcount) of a report it doesn't. The reason
I want to use the sp and not the view is because the sp has date
parameters. So if i use the view instead it just brings all data
back.
My sp is:
SELECT Client_ID,[Quit Date], Quit, [Ethnic ID],Gender
FROM tbl_Client
where [quit date] between @s_date and @e_date
end
My view just selects the same fields as above from the tbl_client
table
This really is doing my head in, any help would be greatly appreciated
Rachel
I keep getting an error message in my adp report when I try to use a
stored procedure as the domain in a dcount formula , however when i
use a view instead it works fine
This is the dcount that works:
=DCount("[Client_ID]","vw_ClientDetails"," [Gender] = 'male' AND
[Ethnic ID] = '1'")
This is the one that doesn't:
=DCount("[Client_ID]","sp_EthnicReport"," [Gender] = 'male' AND
[Ethnic ID] = '1'")
When i execute the sp_ethnicreport it works fine but when i enter it
into the control source (as dcount) of a report it doesn't. The reason
I want to use the sp and not the view is because the sp has date
parameters. So if i use the view instead it just brings all data
back.
My sp is:
SELECT Client_ID,[Quit Date], Quit, [Ethnic ID],Gender
FROM tbl_Client
where [quit date] between @s_date and @e_date
end
My view just selects the same fields as above from the tbl_client
table
This really is doing my head in, any help would be greatly appreciated
Rachel