J
Jeff B
I am trying to show a calculated field (calculated in the query) by using a
subquery. The full query runs correctly when viewed on its own.. The
report runs correctly when bound to the query but without trying to show the
value returned from the subquery. As soon as I bind a textbox to the
subquery the report seems to run but is never previewed on the screen or
printed. The query is as follows:
SELECT [lclRepAcctDepSumm].[PayType], [lclRepAcctDepSumm].[InvNum],
[lclRepAcctDepSumm].[InvDateTime], [lclRepAcctDepSumm].[Type],
[lclRepAcctDepSumm].[ContactID], [lclRepAcctDepSumm].[EmpName],
[lclRepAcctDepSumm].[Prem], [lclRepAcctDepSumm].[Operating],
[lclRepAcctDepSumm].[Direct], [lclRepAcctDepSumm].[CrdDeb],
[lclRepAcctDepSumm].[ConEndHdrID], [lclRepAcctDepSumm].[ConEndEndo],
[lclRepAcctDepSumm].[PaymentType], iif((SELECT COUNT(*) FROM CONCovOV WHERE
lclRepAcctDepSumm.ContactID = ContactID AND CompanyID ='NYAIP' AND
lclRepAcctDepSumm.Type='N')>0,"X","") AS PP
FROM lclRepAcctDepSumm;
the problem field is ofcourse 'PP' a sub query. I think the issue is
binding the report to the subquery value. I have tried using the raw number
returned, or as is posted an iif statment to convert it to an 'X'.
If anyone has an answer short of dumping this to a table and binding to the
table I would be very gratefull.
Version: Access 2000 (Thats what the clients are using).
Dev machine:
XP, 1 gig memory, 3.0 mgz pentium 4
Thanks in advance
Jeff B
subquery. The full query runs correctly when viewed on its own.. The
report runs correctly when bound to the query but without trying to show the
value returned from the subquery. As soon as I bind a textbox to the
subquery the report seems to run but is never previewed on the screen or
printed. The query is as follows:
SELECT [lclRepAcctDepSumm].[PayType], [lclRepAcctDepSumm].[InvNum],
[lclRepAcctDepSumm].[InvDateTime], [lclRepAcctDepSumm].[Type],
[lclRepAcctDepSumm].[ContactID], [lclRepAcctDepSumm].[EmpName],
[lclRepAcctDepSumm].[Prem], [lclRepAcctDepSumm].[Operating],
[lclRepAcctDepSumm].[Direct], [lclRepAcctDepSumm].[CrdDeb],
[lclRepAcctDepSumm].[ConEndHdrID], [lclRepAcctDepSumm].[ConEndEndo],
[lclRepAcctDepSumm].[PaymentType], iif((SELECT COUNT(*) FROM CONCovOV WHERE
lclRepAcctDepSumm.ContactID = ContactID AND CompanyID ='NYAIP' AND
lclRepAcctDepSumm.Type='N')>0,"X","") AS PP
FROM lclRepAcctDepSumm;
the problem field is ofcourse 'PP' a sub query. I think the issue is
binding the report to the subquery value. I have tried using the raw number
returned, or as is posted an iif statment to convert it to an 'X'.
If anyone has an answer short of dumping this to a table and binding to the
table I would be very gratefull.
Version: Access 2000 (Thats what the clients are using).
Dev machine:
XP, 1 gig memory, 3.0 mgz pentium 4
Thanks in advance
Jeff B