Error 3071 in Report

  • Thread starter Ron Powell via AccessMonster.com
  • Start date
R

Ron Powell via AccessMonster.com

I have an Access 97 database created by a user. She has a report with a
sorting and grouping clause using the prefix character of 1. She gets the
3071 error (This expression is typed incorrectly, or is too complex to be
evaluated). If I change the "prefix character" setting to "each value",
the report works fine. Unfortunately, she wants to group on that first
character. Any ideas?
 
G

Guest

Insert a field in the query like: Left([FieldName],1) As PrefixChar
and use it as a grouping field

Note: Change FieldName for the name of your field

Mauricio Silva - 2005
 
R

Ron Powell via AccessMonster.com

I tried that and got the same error in the query. The query works by
itself but fails when you run the report with that grouping or by adding
the grouping in the query.
 
G

Guest

I had this problem before. It happened because my queries were complicated
and the grouping on the report couldn't figure a way to work with... the only
way I figured to work around this, was to simplify my queries, and by this I
mean the ENTIRE chain of queries used.

For example, I changed my crosstab query for something like:

Query 1:
SELECT FiscalYear, DatePart("q", [ApprovalDate]), Amount
FROM [Charges]

Query 2:
Select FiscalYear, Sum(IIf(Quarter = 1, Amount, 0)) AS AmountQ1,
Sum(IIf(Quarter = 2, Amount, 0)) AS AmountQ2, Sum(IIf(Quarter = 3, Amount,
0)) AS AmountQ3, Sum(IIf(Quarter = 4, Amount, 0)) AS AmountQ4
FROM [Query 1]
GROUP BY FiscalYear

Ok, I have two queries now however, they are much simplier to Access to work
with. After this change, the error 3071 never showed up again.

I hope it helps.

Take care.

Mauricio Silva - 2005
 

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

Similar Threads

Expression error 7
Sum in Report field 5
Report error 3
Error 3071 1
Error 3071 3
Error 3071 1
Opening report generates error message 3
Chart not working in report - Help requested 5

Top