Can't add filer on Main query

myhnews

Registered User.
Local time
Today, 09:09
Joined
Dec 30, 2004
Messages
53
Main query:
---------------
SELECT tblOrder.TitleCoID, tblClients.TitleCoName, tblOrder.HandledBy, tblOrder.TitleNo, tblListOrderType.Type, tblOrder.RequestDate, tblOrder.Price, tblOrder.InternalID, Format([RequestDate],"yyyy/mm") AS ReqDate
FROM tblListOrderType RIGHT JOIN (tblClients RIGHT JOIN tblOrder ON tblClients.TitleCoID = tblOrder.TitleCoID) ON tblListOrderType.TypeID = tblOrder.TypeId
WHERE (((tblOrder.TitleCoID)=[Forms]![frmOrderCount]![ClientID]));

Cosstab query:
-----------
TRANSFORM Count(qryOrdersCount.InternalID) AS CountOfInternalID
SELECT qryOrdersCount.Type, Count(qryOrdersCount.InternalID) AS [Total Of InternalID]
FROM qryOrdersCount
GROUP BY qryOrdersCount.Type
ORDER BY qryOrdersCount.ReqDate DESC
PIVOT qryOrdersCount.ReqDate;

If I add the filter to main query, I get this error.
MS office access debase engine does not recognize [Forms]![frmOrderCount]![ClientID] as a valid field name or expression.

If I remove the filter from the main query, it works fine.


Please help.

Thanks
 
Does the form frmOrderCount exist in your database?
Does it contain a control named 'ClientId'?
And most importantly, is it open when you run the main query?
 
The answer to all questions is YES
 
Can you post a copy of your database -remove personal/confidential info first?
We just need enough records to satisfy the query.
 

Users who are viewing this thread

Back
Top Bottom