Default value previous month

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

Guest

Hi
While defining a date field in a table, i want the date filed's default
value to be
current month-1 (December)
e.g January less 1 = December

Thanks in advance
 
Rony said:
Hi
While defining a date field in a table, i want the date filed's
default value to be
current month-1 (December)
e.g January less 1 = December

Thanks in advance

Use a default value property of...

DateAdd("m",-1,Date())
 
Hi Rony,

See the following KB article:

Functions for calculating and for displaying Date/Time values in Access
http://support.microsoft.com/kb/210604

For example, you can use this:
DateSerial(Year(Date()), Month(Date())-1,1)

Tom
_________________________________


Hi
While defining a date field in a table, i want the date filed's default
value to be
current month-1 (December)
e.g January less 1 = December

Thanks in advance
 
Back
Top