Default value previous month

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
 
R

Rick Brandt

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())
 
T

Tom Wickerath

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top