Date Calculation

  • Thread starter Thread starter Lori
  • Start date Start date
L

Lori

I am using Access 97 and need to create a simple form to
calculate a date.

I need to allow the user to enter an Effective Date and
then I need to calculate a date 60 days in the past from
the effective date. Effective Date - 60 = Calculated Date

How can I do this? I don't need to store this
information, I just need it as a easy calculator. Do I
need a source for the form? Can I have the fields be
unbound? I'm just not sure where to put my calculation
within the propeties.

Thanks for the help!
 
I am using Access 97 and need to create a simple form to
calculate a date.

I need to allow the user to enter an Effective Date and
then I need to calculate a date 60 days in the past from
the effective date. Effective Date - 60 = Calculated Date

How can I do this? I don't need to store this
information, I just need it as a easy calculator. Do I
need a source for the form? Can I have the fields be
unbound? I'm just not sure where to put my calculation
within the propeties.
Set the Control Source property of a textbox to

=DateAdd("d", -60, [Effective Date])
 
Thanks John! It worked great....is there a way to default
the date fields to null or blank upon opening the form? I
usually use an event procedure in the form properties to
default to a new record but this form isn't tied to a
table with records. Thanks!

-----Original Message-----
I am using Access 97 and need to create a simple form to
calculate a date.

I need to allow the user to enter an Effective Date and
then I need to calculate a date 60 days in the past from
the effective date. Effective Date - 60 = Calculated Date

How can I do this? I don't need to store this
information, I just need it as a easy calculator. Do I
need a source for the form? Can I have the fields be
unbound? I'm just not sure where to put my calculation
within the propeties.
Set the Control Source property of a textbox to

=DateAdd("d", -60, [Effective Date])



.
 
Thanks John! It worked great....is there a way to default
the date fields to null or blank upon opening the form? I
usually use an event procedure in the form properties to
default to a new record but this form isn't tied to a
table with records. Thanks!

Set the textbox to Null in the Form's Current event.
 
Back
Top