Set control date w/ button

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to create a button in a form that would set a control to be
12/31/____ based on the following year. For example, if that button were
pressed today, the control (let's call it [JoinDate]) would become
12/31/2007. Starting in the new year, the button should yield 12/31/2008,
etc. Any help would be greatly appreciated!
 
Take a look at the DateSerial() function in Access HELP, as well as the
Date() function. Your expression might look something like (actual syntax
may vary):

DateSerial(Year(Date())+1,12,31)

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
That worked great, thanks Jeff!


Jeff Boyce said:
Take a look at the DateSerial() function in Access HELP, as well as the
Date() function. Your expression might look something like (actual syntax
may vary):

DateSerial(Year(Date())+1,12,31)

Regards

Jeff Boyce
Microsoft Office/Access MVP


tminn said:
I am trying to create a button in a form that would set a control to be
12/31/____ based on the following year. For example, if that button were
pressed today, the control (let's call it [JoinDate]) would become
12/31/2007. Starting in the new year, the button should yield 12/31/2008,
etc. Any help would be greatly appreciated!
 
Back
Top