G
Guest
I have a query that says sntax error(comma) in query expression Expr1:
IIf(Not IsNull([datecompleted]) And
(weekends([date],[datecompleted])<=2,"Early") Or
(weekends([date],[datecompleted])>2,"Late"),True,"Y")
This is how my query looks like...
Expr1: IIf(Not IsNull([datecompleted]) And
(weekends([date],[datecompleted])<=2,"Early") Or
(weekends([date],[datecompleted])>2,"Late"),True,"Y")
My weekends is a function that looks like this:
Public Function Weekends(RqstDate As Date, DateCompleted As Date) As Integer
Weekends = _
DateDiff("d", RqstDate, DateCompleted) _
- DateDiff("ww", RqstDate, DateCompleted, 7) _
- DateDiff("ww", RqstDate, DateCompleted, 1)
End Function
IIf(Not IsNull([datecompleted]) And
(weekends([date],[datecompleted])<=2,"Early") Or
(weekends([date],[datecompleted])>2,"Late"),True,"Y")
This is how my query looks like...
Expr1: IIf(Not IsNull([datecompleted]) And
(weekends([date],[datecompleted])<=2,"Early") Or
(weekends([date],[datecompleted])>2,"Late"),True,"Y")
My weekends is a function that looks like this:
Public Function Weekends(RqstDate As Date, DateCompleted As Date) As Integer
Weekends = _
DateDiff("d", RqstDate, DateCompleted) _
- DateDiff("ww", RqstDate, DateCompleted, 7) _
- DateDiff("ww", RqstDate, DateCompleted, 1)
End Function