Sure. Build the SQL string, and execute it. Here's an example:
Dim db As DAO.Database
Dim strSql As String
strSql = "DELETE * FROM YourTableName WHERE YourDateField Between
#01/01/2007# AND #12/31/2007#;"
Set db = CurrentDb
db.Execute strSQL, dbFailOnError
Set db = Nothing
And here's a simpler example:
Dim strSql As String
strSql = "DELETE * FROM YourTableName WHERE YourDateField Between
#01/01/2007# AND #12/31/2007#;"
DoCmd.RunSQL strSQL
The first method is preferable, since it eliminates possible confirm
dialogs, allows you to check how many records were affected, and allows you
to trap errors. For more details, see the following page on Allen Browne's
site:
http://allenbrowne.com/ser-60.html
HTH,
Rob