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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Default Date in m/yy Format to Last Month 1

Status
Not open for further replies.

Hillary

Programmer
Feb 15, 2002
377
US
I have a field Period in my table which represents the Accounting Peroid. Periods are based on Month/Year. Information entered into this table will usually be for the prior month's accounting period so I want to default the date to last month. For example, if I enter a record anytime during July 03, I want the date to default to 6/03.

Format: m/yy
Default: Date()-1 (this only subtracts 1 day; I want to subtract 1 month)

Thanks for your help!

Hillary
 
Try...

=Format(DateAdd("m",-1,Date()),"mm/yy")

ProDev, MS Access Applications
Visit me at ==> Contact me at ==>lonniejohnson@prodev.us

May God bless you beyond your imagination!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top