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:
 

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

Back
Top