calculate a future date

S

Selby

I have two text boxes on a form - one is for my start date and the other is
for my expiration date in the future. I have used the following expression
but when I put in my start date I get a #Name? for my expiration date. Any
help is appreciated. Thanks!

=DateSerial (year ([StartDate]), month ([StartDate]) +3, day ([StartDate]))
 
B

BruceM

Is StartDate the exact name of the field, and is it available to the form?
It sounds as if Access doesn't know what you mean by StartDate. As a test,
try setting the Control Source pf the ExpDate text box to:
=[StartDate]

Also, you may find DateAdd easier to use:
=DateAdd("m",3,[StartDate])

See Help for more information about DateAdd.
 
S

Selby

The Date Add worked perfectly. Thanks so much!!!

BruceM said:
Is StartDate the exact name of the field, and is it available to the form?
It sounds as if Access doesn't know what you mean by StartDate. As a test,
try setting the Control Source pf the ExpDate text box to:
=[StartDate]

Also, you may find DateAdd easier to use:
=DateAdd("m",3,[StartDate])

See Help for more information about DateAdd.

Selby said:
I have two text boxes on a form - one is for my start date and the other is
for my expiration date in the future. I have used the following
expression
but when I put in my start date I get a #Name? for my expiration date.
Any
help is appreciated. Thanks!

=DateSerial (year ([StartDate]), month ([StartDate]) +3, day
([StartDate]))
 

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

Top