Running a delete query in Access 2010

  Neill 16:42 PM 23 Nov 11
Locked
Answered

I want to delete all orders placed in 2011. The Date field has criteria of Year([Date])=2011 (or I have tried Between 01/01/11 And 31/12/11). I can View the query which works and only displays orders in 2011. However when I run the query I get Unknown Function Date in Valedation Expression or default value on Orderdetails.Date

Strange that it Views OK but won't Run.

Any idea what I am doing wrong? Thanks

  Neill 10:00 AM 24 Nov 11
Answer

Having another play, the table had a field "Date" which must have been OK in Access 2003 because the Delete query worked, but is now a "reserved word" in 2010. Changed the field to DateOfOrder and all is OK.

Advertisement

This thread is now locked and can not be replied to.

How to watch EA Gamescom 2015 Press Conference live: EA Gamescom live stream - watch EA talk Star…

1995-2015: How technology has changed the world in 20 years

Play the retro 8-bit dating naked adventure game by The Uprising Creative

From Antennagate to Yellowgate: The 10 worst Apple scandals (and why they were blown out of proport)…