Date Question

  • Thread starter Thread starter BobC
  • Start date Start date
B

BobC

Using Access 2000 ...
I what to know if there are existing functions (used loosely) to help me
in entering default values initially showing up in a form but eventually
(once accepted by the user) to be placed in fields of a table. The form
will be used to subsequently activate reports based on these dates. I
would like to have the 'default' start and end dates to be based on the
current month. e.g. Given this is November ... I would like the start
and end dates to automatically default to last month's dates ...
StartDate defaults to 10/01/03 and EndDate defaults to 10/31/03. I
would want these dates (or the dates that may be overridden by the user)
to automatically go into fields of a table for use by my reports.

Suggestions Appreciated ...
Bob
 
First day of prior month:
DateSerial(Year(Date()), Month(Date())-1,1)

Last day of prior month:
DateSerial(Year(Date()),Month(Date()), 0)

In your form you can use the formulas as the default value for a control bound
to your field. Just put an equal sign in front of the formula and put that in
the default property of the control.
 
THANK YOU!
First day of prior month:
DateSerial(Year(Date()), Month(Date())-1,1)

Last day of prior month:
DateSerial(Year(Date()),Month(Date()), 0)

In your form you can use the formulas as the default value for a control bound
to your field. Just put an equal sign in front of the formula and put that in
the default property of the control.



BobC wrote:
 
Back
Top