SheilaAlighieri
Technical User
Hi everybody!
I am trying to make a complicated code in VB. But I am not even sure if what I am trying is possible. I have a data entry form in which a date is entered. Now I want the system to derive some information automatically from this date and enter it two other fields in the table, namely the budget year and the quarter. I got these things working in a query:
Budget Year: IIf(Month([Date])>3;Year([Date]) & "/" & Year([Date])+1;Year([Date])-1 & "/" & Year([Date]))
Quarter: Switch(Format([Date];"q"
="1";"4";Format([Date];"q"
="2";"1";Format([Date];"q"
="3";"2";Format([Date];"q"
="4";"3"
Is there a way to integrate these codes in VB or achieve the same result without using queries? It would decrease my use of queries and solve a nasty problem I am having with reports
If I hook it up to an AfterUpdate sub on the date field I should get it to work.
Thanks for reading!
Sheila
I am trying to make a complicated code in VB. But I am not even sure if what I am trying is possible. I have a data entry form in which a date is entered. Now I want the system to derive some information automatically from this date and enter it two other fields in the table, namely the budget year and the quarter. I got these things working in a query:
Budget Year: IIf(Month([Date])>3;Year([Date]) & "/" & Year([Date])+1;Year([Date])-1 & "/" & Year([Date]))
Quarter: Switch(Format([Date];"q"
Is there a way to integrate these codes in VB or achieve the same result without using queries? It would decrease my use of queries and solve a nasty problem I am having with reports
Thanks for reading!
Sheila