Crosstab filtering

C

Chris

Hi Group. I am trying to filter, a crosstab union query by one of the
controls on my form. When I put the control in the criteria of the query, I
get the following error message

The microsoft Jet database engine does not recognise
[Forms]![frmAsset1]![cboClient] as a valid field name or expression.

I then tried to built a query on the table and use the filter on this query.
this worked. I then added the query in place of the table in the cross tab
query and the same error message appeared as above.

I can filter the crosstab query by adding a value into the criteria of the
client but cannot add any field names without getting the above error.

Please Help

Query

TRANSFORM First(tblAssetGeneralValue.AssetValue) AS FirstOfAssetValue
SELECT tblAssetGeneral.AssetName, qryAssets.ClientID
FROM (qryAssets INNER JOIN tblLAsset ON qryAssets.AssetType =
tblLAsset.AssetTypeID) INNER JOIN (tblLValueType INNER JOIN
(tblAssetGeneralValue INNER JOIN tblAssetGeneral ON
tblAssetGeneralValue.GeneralAssetID = tblAssetGeneral.GeneralAssetID) ON
tblLValueType.ValueTypeID = tblAssetGeneralValue.AssetType) ON
qryAssets.AssetID = tblAssetGeneral.AssetID
WHERE (((qryAssets.ClientID)=[Forms]![frmAsset1]![cboClient]))
GROUP BY tblAssetGeneral.AssetName, qryAssets.ClientID
ORDER BY tblLValueType.ValueType DESC
PIVOT tblLValueType.ValueType;
 
D

Duane Hookom

A quick search of this group with your error message and the word crosstab
would find that you must specify the data type of your parameter. Select
Query->Parameters and enter:
[Forms]![frmAsset1]![cboClient] Text (or whatever)
 

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