By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,397 Members | 1,425 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,397 IT Pros & Developers. It's quick & easy.

How do you Auto update a date as a default value?

100+
P: 147
I Have a form that I use to launch a report from. In the form I have two hidden text boxes that are date fields called fiscal1 and fiscal2.

Fiscal1 has a default value of 7/1/2007
Fiscal2 has a default value of 6/30/2008

Is there a way to have these two fields automatically change each year. Such as on July 1 2008 I want Fiscal1 to change to 7/1/2008 annd Fiscal2 to change to 6/30/2009.

Thanks
Dan
Dec 18 '07 #1
Share this Question
Share on Google+
2 Replies


P: 1
Try this for fiscal year start...

IIf(Month(Date())>6,"7/1/"&Year(Date()),Year(Date()-1))

and something similar for fiscal year end.

rather than messing with your system date...to simulate the date changing in your testing just substitute an actual date i.e. #2/12/2020# for the expression Date()

this will provide the value in a text rather than datetime format...a ghetto way to workaround that issue is to append the data into an empty table with the field formatted as datetime
Dec 20 '07 #2

100+
P: 147
Thank you!!!!!!
Dan
Dec 21 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.