What is the data type of the field qryRWAall.FY?
What is the SQL of qryRWAall?
--
John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
..
Thanks, didn't work. Without the declaration query worked for each
year,
but
report worked only for 2002 and 2008. With declaration query and
report
do
not work for any year.
:
It's sometimes possible to fix this problem by formally declaring the
parameter(s) you are using:
PARAMETERS [What Year?] Long;
SELECT ...
If the FY field is a text string, rather than a number (eg. it's been
calculated using a FORMAT expression on a date/time field), then
you'll
need
to declare the parameter as Text.
HTH,
Rob
Thanks.
Here's the query SQL
SELECT qryRWAall.FY, qryRWAall.ST, qryRWAall.City, qryRWAall.[RWA
Number],
qryRWAall.Agency, qryRWAall.RWAtotal, qryRWAall.RWABalance,
qryRWAall.[GSA
Official], Count(qryRWAall.[RWA Number]) AS [CountOfRWA Number]
FROM qryRWAall
GROUP BY qryRWAall.FY, qryRWAall.ST, qryRWAall.City, qryRWAall.[RWA
Number],
qryRWAall.Agency, qryRWAall.RWAtotal, qryRWAall.RWABalance,
qryRWAall.[GSA
Official], qryRWAall.Cancelled, qryRWAall.Closed
HAVING (((qryRWAall.FY)=[What Year?]) AND ((qryRWAall.Cancelled) Is
Null)
AND ((qryRWAall.Closed) Is Null))
ORDER BY qryRWAall.FY, qryRWAall.ST, qryRWAall.City, qryRWAall.[RWA
Number];
Query returns the correct data set.
Report based on query contains the same fields except cancelled and
closed.
When you open the report you get the Enter Year parameter box. If
you
enter
2002 or 2008 report has correct data. If you enter any other year
2003
thru
2007 you get the error message above.
:
On Wed, 2 Apr 2008 11:40:01 -0700, OldGuy wrote:
Database runs from 2002 to present. I have a query that works
properly
and
provides dataset for any year entered. However, report based on
query
will
only return data for 2002 and 2008. Any other year I get an
error
"Expression typed incorrectly, or is too complex to be
evaluated..."
Only 4
digits are being entered as in the query.
It doesn't appear that it should be as difficult as the amount of
time
I
have spent on it. Thanks in advance
You can see your database, we can't.
Please post the query SQL (copy and paste it into a message) as
well
as anything you have in the report's Filter property (on the
property
sheet's Data tab).
Also, if you are opening the report using code, post the code as
well.