Re: Data Type Mismatch in Criteria Expression
- From: "Douglas J. Steele" <NOSPAM_djsteele@xxxxxxxxxxxxxxxx>
- Date: Tue, 26 May 2009 16:10:51 -0400
It's possible, but I'd be surprised if it's a bug.
I think you missed my point about the difference between WHERE and HAVING
though. Unless you're trying to sort on the results of the grouping, you
should always use WHERE, not HAVING. WHERE is evaluated before the grouping
is done, so you'll be grouping a smaller set of data (and hence it should be
faster)
--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)
"nytwodees" <nytwodees@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:6FFA3AFF-7901-4BC2-B6C5-EED83ED52475@xxxxxxxxxxxxxxxx
Hi Douglas:
Thanks again for your reply and for bringing the "Drop Downs" to my
attention. I was unaware of that capability.
I have run the original query using Microsoft Access 2000 instead of
Access
97. In Access 2000, I do not get any errors at all. The query works as
desired. The SQL using "HAVING" and the end of the SQL as already shown
in
my original SQL view works OK. (Seems that there is no need for the
"WHERE"
statement. This leads me to believe that there is a bug in Access 97 or a
corruption on my Access files on my computer. What do you think?
Dan
"Douglas J. Steele" wrote:
The error could be because you've got a Null value in the field.
Access generated exactly what SQL you told it to. You put your criteria
under fields that had the property in the Sort row set to Group By. To
have
Access use WHERE instead of HAVING, add the fields that have criteria to
the
grid a second time and uncheck the Show box. Change the Sort row to Where
and set the criteria under these new fields instead of under the fields
that
are set to Group By.
.
- Follow-Ups:
- Re: Data Type Mismatch in Criteria Expression
- From: nytwodees
- Re: Data Type Mismatch in Criteria Expression
- References:
- Data Type Mismatch in Criteria Expression
- From: nytwodees
- RE: Data Type Mismatch in Criteria Expression
- From: nytwodees
- Re: Data Type Mismatch in Criteria Expression
- From: Douglas J. Steele
- Re: Data Type Mismatch in Criteria Expression
- From: nytwodees
- Data Type Mismatch in Criteria Expression
- Prev by Date: Re: ERROR 3125 when trying to enter design view of a query in 2007
- Next by Date: Re: ERROR with no direction on how to fix - " is not a valid name...
- Previous by thread: Re: Data Type Mismatch in Criteria Expression
- Next by thread: Re: Data Type Mismatch in Criteria Expression
- Index(es):
Relevant Pages
|