Help with a calculated Date expression

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

Guest

I am trying to create an expression that will populate one date field based
on the input of another. Specifically I would like my new field to be
calculated so that it reflects the first day of the month prior to the date
that I have filled in in my first date field. Can anyone help with this
expression.
 
The expression to calculate the first day on the month of a given date is:

DateSerial(Year(GivenDate), Month(GivenDate), 1)

However, I am not sure of your set-up. Are you talking about Fields in the
Table or "Fields" in a Form?

(Actually, a Form has Controls, not Fields but it seems that lots of people
using "Fields" when they actually refer to Controls).

If you refer to a Table Field, then this is a Calculated Value and should
not be stored in the Table since you can always work it out from the first
Field using the above expression.

If you refer to a Form Control, then you can use the above expression to
display the value but don't save it to your Table.
 
Back
Top