Serial Date Parameter

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
 
K

Ken Snell

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)
 
V

Van T. Dinh

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)
 

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