neilduffy1024
New member
- Local time
- Today, 11:09
- Joined
- Aug 5, 2015
- Messages
- 7
Hi all,
I a new to Access but have some experience with VBA and am reasonably comfortable with coding.
I'm trying to run a very basic iif statement to correct hourly data for sorting. Basically, a trading day runs from 8am - 8am, so I need to adjust the hours to ensure that 1am on the 15th trading day (really the 16th on the calendar), comes after 9am on the 15th trading day (which will actually be the 15th on the calendar).
Here's what I've used. It's driving me bananas, because it keeps telling me that there's a syntax error (comma) in the query expression, but I can't understand why?
Sort2: IIf([DELIVERY_HOUR]<8,[DELIVERY_HOUR]+24,[DELIVERY_HOUR])
Any help would be much appreciated.
Cheers,
Neil
P.S. I know there are similar threads on IIf statements, and having looked at them I can't see why the syntax would be wrong, so I'm wondering if I'm missing something else.
I a new to Access but have some experience with VBA and am reasonably comfortable with coding.
I'm trying to run a very basic iif statement to correct hourly data for sorting. Basically, a trading day runs from 8am - 8am, so I need to adjust the hours to ensure that 1am on the 15th trading day (really the 16th on the calendar), comes after 9am on the 15th trading day (which will actually be the 15th on the calendar).
Here's what I've used. It's driving me bananas, because it keeps telling me that there's a syntax error (comma) in the query expression, but I can't understand why?
Sort2: IIf([DELIVERY_HOUR]<8,[DELIVERY_HOUR]+24,[DELIVERY_HOUR])
Any help would be much appreciated.
Cheers,
Neil
P.S. I know there are similar threads on IIf statements, and having looked at them I can't see why the syntax would be wrong, so I'm wondering if I'm missing something else.