R
Rob
I asked this question yesterday and got a response but Im
still having problems and I didnt know how far back the
moderators look.
I have a field on a form asking for a date ([Date]) and Im
trying to find a way to make a hidden field ([Previous])
automatically contain the first date of the previous
month. For Example, if [Date]="8/1/03", then [Previous]
= "7/1/03", what is the calculation for that?
The solutions I received were:
Me.[Previous] = DateSerial(Year(CDate(Me.[CurrDate])),
Month(CDate(Me.[CurrDate])) - 1, 1)
and
DateSerial(Year([Date]), Month([Date]) - 1, 1)
I tried both and what I got was:
[Date]=8/1/03, then [Previous] = 7/27/03
I didnt actually use [Date] as the field name, just for
the example.
still having problems and I didnt know how far back the
moderators look.
I have a field on a form asking for a date ([Date]) and Im
trying to find a way to make a hidden field ([Previous])
automatically contain the first date of the previous
month. For Example, if [Date]="8/1/03", then [Previous]
= "7/1/03", what is the calculation for that?
The solutions I received were:
Me.[Previous] = DateSerial(Year(CDate(Me.[CurrDate])),
Month(CDate(Me.[CurrDate])) - 1, 1)
and
DateSerial(Year([Date]), Month([Date]) - 1, 1)
I tried both and what I got was:
[Date]=8/1/03, then [Previous] = 7/27/03
I didnt actually use [Date] as the field name, just for
the example.