Query error

T

Ted

When I run this query, I get "Cannot group on fields
selected with '*'. (Error 3121)"

Any idea what is causing this error?

Thanks...


SELECT [ap-check].ck_loc, [ap-check].ck_nbr, [ap-
check].ck_vendor, Sum([Expr2] & [ck_amount]) AS Amount, IIf
([ap-check]![ck_amount]="",0) AS Expr2, [ap-
check].ck_amount, [ap-check].ck_type, [ap-
check].ck_answer, [ap-check].ck_mm, [ap-check].ck_dd, [ap-
check].ck_yy, [ck_mm]+[ck_dd]+[ck_yy] AS Expr1, [ap-
check].ck_where, *
FROM [ap-check]
WHERE ((([ap-check].ck_type)="9") AND (([ck_mm]+[ck_dd]+
[ck_yy]) Between [Enter Starting Date] And [Enter Ending
Date]));
 
J

Jeff Boyce

Ted

What happens if you remove the ", *" from the expression?

Good luck

Jeff Boyce
<Access MVP>
 
B

Bob S

I got the same -- canot group by "*" -- error msg....even though that query had previously run with Group By Like "*/*/2003" in my date field
Removing the * did no good, Access produced same error msg, & same refusal to run that query

I simply re-entered an entirely new query with exactly the same fields, & the same Group By * criteria. It ran fine

Does Access contain spiteful / primadonna code ? (Access 2000, XP, new Dell)
 
J

Jeff Boyce

Bob

Were I having this issue, the next thing I'd do is create a new query, from
scratch, adding one element at a time to see if it still breaks.

Good luck

Jeff Boyce
<Access MVP>
 
G

Guest

Okay, I feel better. I will re-enter the whole query and
see if it runs. I probably should have already tried re-
writing the query, but I couldn't find anything wrong with
it (with my limited knowledge) and was trying to trouble-
shoot it in an attempt to learn.

All of the feedback is greatly appreciated!

Thanks...
-----Original Message-----
I got the same -- canot group by "*" -- error msg....even
though that query had previously run with Group By
Like "*/*/2003" in my date field.
Removing the * did no good, Access produced same error
msg, & same refusal to run that query.
I simply re-entered an entirely new query with exactly
the same fields, & the same Group By * criteria. It ran
fine.
 

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