Query Question

J

JIT

I have this update query in Access. When I run the query, it tells me there
is a data mismatch in the criteria.(update to field) Can you tell me what is
wrong with it?

IIf(DateDiff("d","Arrival Date",[Start Date])>CLng([Rates]![Free
Days]),[Departure Date]) Or IIf(DateDiff("d","ArrivalDate",[Start
Date])<CLng([Rates]![Free Days]),(("Max Charge Days
Total")-CLng(([Rates]![Free Days])-(DateDiff("d","Arrival Date",[Start
Date])))))
 
L

Lynn Trapp

Hard to say without knowing your data, but "Arrival Date" is a string, while
I would imagine that [Start Date] is a date field. The DateDiff function
requires 2 Dates for it's arguments.
 

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

Similar Threads

Query Question 1 1
Update SQL 1
Update Error 1
SQL Mix up? 3
Query Trouble 1
Date/Time Filter problem 5
Update query criteria 10
Subquery in an aggregate query. 3

Top