PC Review


Reply
Thread Tools Rate Thread

data type mismatch in criteria expression

 
 
kalle
Guest
Posts: n/a
 
      3rd Apr 2009

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

*** Sent via Developersdex http://www.developersdex.com ***
 
Reply With Quote
 
 
 
 
jasontferrell
Guest
Posts: n/a
 
      3rd Apr 2009
Use #4/1/2009# instead.
 
Reply With Quote
 
joel
Guest
Posts: n/a
 
      3rd Apr 2009
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'"


"kalle" wrote:

>
> 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
>
> *** Sent via Developersdex http://www.developersdex.com ***
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Data Type Mismatch in Criteria Expression =?Utf-8?B?Um9iZXJ0IFQ=?= Microsoft Access Form Coding 13 2nd Jun 2009 12:43 AM
Re: Data type mismatch in criteria expression John W. Vinson Microsoft Access Forms 5 1st Mar 2009 02:58 PM
Data type mismatch in criteria expression. Zen Masta Microsoft Access 2 31st May 2006 08:15 PM
HELP!! - Data type mismatch in criteria expression Bantha Microsoft ADO .NET 1 22nd Feb 2006 07:54 PM
HELP!! - Data type mismatch in criteria expression Bantha Microsoft ADO .NET 1 21st Feb 2006 11:42 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:29 AM.