Sharon Hague
Registered User.
- Local time
- Today, 23:11
- Joined
- Jul 10, 2003
- Messages
- 138
Hi All
I have a form with a date/time field called "Date".
I have created a label within this form called "Mth"
I want to be able to put an iif function into the After Update properties of my field "Date" so that it returns a value in my "Mth" field dependant on the field "Date" results.
i.e
iif [Date] between #01/01/03# and 31/01/03 then [Mth] = "1"
else iif [Date] between #01/02/03# and 28/02/03 then [Mth] = "2"
else iif [Date] between #01/03/03# and 31/03/03 then [Mth] = "3"
else "error"
I've not much knowledge on VBA and can't seem to get anywhere with the above.
Can anybody help?
I have a form with a date/time field called "Date".
I have created a label within this form called "Mth"
I want to be able to put an iif function into the After Update properties of my field "Date" so that it returns a value in my "Mth" field dependant on the field "Date" results.
i.e
iif [Date] between #01/01/03# and 31/01/03 then [Mth] = "1"
else iif [Date] between #01/02/03# and 28/02/03 then [Mth] = "2"
else iif [Date] between #01/03/03# and 31/03/03 then [Mth] = "3"
else "error"
I've not much knowledge on VBA and can't seem to get anywhere with the above.
Can anybody help?