my xtab query is based on another select query, and the field I wanna
filter
is not on the xtab one, and when I try to filter the source one using a
form
to get the parameters ,I get the message from access "the microsoft jet
database engine does not recognize '[Forms]![StaRep]![txtSal]' as a valid
field name or exp"!
here are my sql :
"SELECT QfullStationary.*, Left$(QfullStationary!EnterDate,4) AS sal,
Mid$(QfullStationary!EnterDate,5,2) AS mah, QfullStationary.OmorAlias,
QfullStationary.LEVEL, Forms!StaRep!txtSal AS Expr1
FROM QfullStationary
WHERE
(((Left$([QfullStationary]![EnterDate],4))=[Forms]![StaRep]![txtSal]));"
and
TRANSFORM Sum(QStaMahSal.Qtty) AS SumOfQtty
SELECT QStaMahSal.QfullStationary.LEVEL, QStaMahSal.NameGroup,
QStaMahSal.NameKala, QStaMahSal.Moavenat, QStaMahSal.MoavenatId,
Sum(QStaMahSal.Qtty) AS [جمع تعداد]
FROM QStaMahSal
GROUP BY QStaMahSal.QfullStationary.LEVEL, QStaMahSal.NameGroup,
QStaMahSal.NameKala, QStaMahSal.Moavenat, QStaMahSal.MoavenatId
PIVOT QStaMahSal.QfullStationary.OmorAlias;
I just open my report from the form.tnx
Duane Hookom said:
IMO, parameters should never be prompts. All user interaction should be
through controls on forms. Crosstab queries generally require you to set
the
parameter data types in the query.