data type mismatch in criteria expression

K

kalle

Hi

I try to delete som records in an Access table but i can't find out how
to do it
The code below givs an error messages

data type mismatch in criteria expression

What is wrong?

"DELETE FROM table_name WHERE lastsaved < '2009-04-01'"

Thanks in advance
 
J

joel

Are Table_name and lastsaved variable.? then you have to break sht estrig
into pieces

from
"DELETE FROM table_name WHERE lastsaved < '2009-04-01'"


to
"DELETE FROM " & table_name & "WHERE " & lastsaved & "< '2009-04-01'"
 

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