Hi Jean-Paul,
I never use the editing (im)possibilities of Access but some programmers
editor. There are plenty. I use Notepad++ wich does highlighting on keywords
en on corresponding parenthesis '()', '{}' as well as '[]'.
I would use it for your formula like this:
schljaar=IIf
(
(Month(Date()) Between 9 And 12)
, (Year(Date()) & "-" & Year(Date())+1)
, (Year(Date())-1 & "-" & Year(Date()))
)
I always (well allmost allways) use parenthesis around almost anything that
should be taken as an unit.
IIF has 3 elements:
IIF((condition), (expression if true), (expression if false))
Your conditionparts reads:
Month(Date() Between 9 And 12
You wil count 2 times '(' and 1 time ')' so the closing parenthesis right
after the one of Date() is the one that is missing
Month(Date()) Between 9 And 12
would be correct.
Finally, studiing Lisp pays of; the nickname of lisp being Lots of Irritating
Single Parenthesis...
Rgards,
Kees de Boer
Beverwijk