Query Question

  • Thread starter Thread starter Guest
  • Start date Start date
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])))))
 
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.
 
Back
Top