[AccessD] A2K: Date in Query

Drew Wutka DWUTKA at marlow.com
Tue Jun 17 23:37:44 CDT 2003


Year(Date()).  Without the (), the query thinks it's text.

Do we need an Access 101 course Darren?  <evilgrin>, just kidding, I've been
nabbed about a dozen times in the past week for putting Date in a query, and
having it quote it on me...ARG!  I need a vacation!

Drew

-----Original Message-----
From: Darren DICK [mailto:d.dick at uws.edu.au]
Sent: Tuesday, June 17, 2003 10:31 PM
To: AccessD List
Subject: [AccessD] A2K: Date in Query


Hello all
When I put msgbox Year(Date) behind a button click I get 2003. No Prob
When I put that criteria Year(Date) into a query Access changes it to
Year("Date")
and of course it fails.
What is the correct syntax to search on the 'current year' on a field that
holds that data?

Many thanks

Darren


_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com


More information about the AccessD mailing list