Invalid operation error message

J

John A.

I recently switched from Windows 98 to Windows XP (SP1),
using MS Office 2000 in each case (SP3 on the new
machine).

Here's the problem -- Query_3 returns an "Invalid
operation" error on XP, but not on the Win98 machine. I
cannot find any documentation on this. I've tried
the following steps:

1) deleting the Diff and Lag calculations from Query 3
(doesn't help).
2) deleting other fields from Query 3 singly (doesn't
help, until I remove all the aggregate derived elements
relating either to q1 or to q2 - then the others work)
3) renaming the fields as expressions in q3, then in q1
and q2 (doesn't help)
4) doing (3) and multiplying by 1 to trick the
application (doesn't work)

Thoughts?

Here are the queries:

Query_1:

SELECT PersInfo.HOHISN,
Max(Prms.CvgDate) AS MaxOfCvgDate,
Sum(Prms.CostShg) AS SumOfCostShg
FROM PersInfo
INNER JOIN (ISNPersAddrLink
INNER JOIN (ISNPrmsLink
INNER JOIN Prms
ON ISNPrmsLink.PrmsID = Prms.PrmsId)
ON ISNPersAddrLink.ISN = ISNPrmsLink.ISN)
ON PersInfo.PersId = ISNPersAddrLink.PersID
GROUP BY PersInfo.HOHISN;

Query_2:

SELECT
PersInfo.HOHISN,
Max(PrmPay.DepDate) AS MaxOfDepDate,
Sum(PrmPay.Amount) AS SumOfAmount
FROM PersInfo
INNER JOIN (ISNPersAddrLink
INNER JOIN (ISNPrmPayLink
INNER JOIN PrmPay
ON ISNPrmPayLink.PrmPayID = PrmPay.PrmPayId)
ON ISNPersAddrLink.ISN = ISNPrmPayLink.ISN)
ON PersInfo.PersId = ISNPersAddrLink.PersID
GROUP BY PersInfo.HOHISN;

Query_3:

SELECT
Query_1.HOHISN,
Query_1.MaxOfCvgDate,
Query_2.MaxOfDepDate,
Query_1.SumOfCostShg,
Query_2.SumOfAmount,
[Query_2]![SumOfAmount]-[Query_1]![SumOfCostShg] AS Diff,
[Query_1]![MaxOfCvgDate]-[Query_2]![MaxOfDepDate] AS Lag
FROM Query_2
INNER JOIN Query_1 ON Query_2.HOHISN = Query_1.HOHISN;
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top