Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to evaluate a control with a calculated value

Status
Not open for further replies.

lsantos

Programmer
Jun 9, 2003
24
0
0
AU
I'm not very familiar with expression builder and I would like to evaluate a control with a value, something like this:

if current month is > 6 then
"currentYear" & "/" & "(currentYear + 1)" e.g. "2007/2008"
otherwise
"(currentYear - 1)" & "/" & "currentYear" e.g. "2006/2007"

tried:
IIf(Month > 7, StrConv(Year) & StrConv(Year + 1), StrConv(Year - 1) & StrConv(Year))

...but access 2k3 doesn't like it.

Any suggestions appreciated,

thank you
-luis
 
How about something like:

IIf(Month(Date())>=6,Year(Date()) & "/" & Year(Date())+1,Year(Date()+1) & "/" & Year(Date()+2))

Lena

Lena
Using Access 2003
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top