I am in need of much help here.... kind of new to sub-reports.
My main report works fine and I have the sub report linked fine.
The problem is when there are no records in the subreport
Ok I have a sub-report that the record source is a sql
SELECT id,count(datemailed) as DateLetterMailedOut
FROM tblProduct
WHERE ContactType = "Mail"
GROUP BY id;
and when there are records the text box is populated.
what I want to be able to do is when there are no records found to show
0 (Zero) as the count
I tried putting in the control source of the text box
=iif(isnull([DateLetterMailed]),0,[DateLetterMailed])
then I tried
=iif(isnull([DateLetterMailed]),"0",[DateLetterMailed])
then I tried
=iif(isnull([datemailed]),0,[datemailed])
and I tried
=iif(isnull([datemailed]),"0",[datemailed])
and none of these worked.....
If anyone knows what I am doing wrong or has another solution, PLEASE HELP!!!
Thanks
Andrew
[sig][/sig]
My main report works fine and I have the sub report linked fine.
The problem is when there are no records in the subreport
Ok I have a sub-report that the record source is a sql
SELECT id,count(datemailed) as DateLetterMailedOut
FROM tblProduct
WHERE ContactType = "Mail"
GROUP BY id;
and when there are records the text box is populated.
what I want to be able to do is when there are no records found to show
0 (Zero) as the count
I tried putting in the control source of the text box
=iif(isnull([DateLetterMailed]),0,[DateLetterMailed])
then I tried
=iif(isnull([DateLetterMailed]),"0",[DateLetterMailed])
then I tried
=iif(isnull([datemailed]),0,[datemailed])
and I tried
=iif(isnull([datemailed]),"0",[datemailed])
and none of these worked.....
If anyone knows what I am doing wrong or has another solution, PLEASE HELP!!!
Thanks
Andrew
[sig][/sig]