Steve_Bache
Registered User.
- Local time
- Today, 20:02
- Joined
- Mar 13, 2006
- Messages
- 24
Help again please !
I'm trying to populate a "Quarterly" field ( as in yearly quarters , values 1 through 4 ) in a query. I'm using the following expression :-
Qtr: IIf(Month([RequestDate])=1,1,0) Or IIf(Month([RequestDate])=2,1,0) Or IIf(Month([RequestDate])=3,1,0) Or IIf(Month([RequestDate])=4,2,0) etc.
However, the result is coming back with -1 for all records.
Question : am I correct in using the IiF function for this and if so what is wrong or what is the correct way to achieve the result I'm looking for ?
Cheers
Steve
I'm trying to populate a "Quarterly" field ( as in yearly quarters , values 1 through 4 ) in a query. I'm using the following expression :-
Qtr: IIf(Month([RequestDate])=1,1,0) Or IIf(Month([RequestDate])=2,1,0) Or IIf(Month([RequestDate])=3,1,0) Or IIf(Month([RequestDate])=4,2,0) etc.
However, the result is coming back with -1 for all records.
Question : am I correct in using the IiF function for this and if so what is wrong or what is the correct way to achieve the result I'm looking for ?
Cheers
Steve