Serial Date Parameter

  • Thread starter Thread starter Brennan
  • Start date Start date
B

Brennan

Hello:

I have a query that has a field named Bid Date. I want to
design a query that will select only return those records
that have a Bid Date in the current year. I have put the
following parameter in my criteria field:


Between DateSerial(Year("Date"),1,1) And DateSerial(Year
("Date"),12,31)

When I run the query, I get the follwing error message:

Data type mismatch in criteria expression

The field is formatted as a Date type.

Any comments or suggestions would be appreciated.

Brennan
 
I assume that you want to use the Date function not the literal text string
"Date". If so, change to this:

Between DateSerial(Year(Date()),1,1) And DateSerial(Year(Date()),12,31)
 
My guess is that the Bid Date is ALWAYS in the past and if
this is true, you can simplify your criteria to:

WHERE [Bid Date] >= DateSerial(Year(Date()), 1, 1)

HTH
Van T. Dinh
MVP (Access)
 
Back
Top