Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old June 27th, 2008, 08:25 PM
Snoopy33
Guest
 
Posts: n/a
Default Datatype mismatch in criteria

I have a query that builds a date from a text field with the date
imput as yyyymmdd in the query, so i have to piece it together in my
expression as follows:

exp: FormatNumber(DateDiff("d",DateSerial(Left([package activity date],
4),Left(Right([package activity date],4),2),Right([package activity
date],2)),Now())))


if i don't use a criteria, it works fine. when i try to use the
criteria <7 is when i get the error. It will show the correct records
for a few seconds prior to getting the error, but then i get an error
"datatype mismatch in criteria".

I've tried it with and without the formatnumber function, with and
without the dateserial function (rearranging the expression) and still
get the error.

Any help?
 

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

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 Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles