Query Question

G

Guest

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


Top