Expression on a form to calculate a future date

G

Guest

Hi,
I have create a text box in a subform.
I want to take the startdate from the main form (tblstaff) and add 6 months
to calculate an expected end date.
I have tried this expression:
=[TblStaff]![StartDate]+186

However I keep getting Name# in the field.
Any suggestions?
Thanks.
 
G

Guest

I think you may just be missing the [Forms] qualifier. So your statement
would look like this:

=[Forms]![TblStaff]![StartDate]+186

Although, wouldn't 182 or 183 be a little more accurate a number, for six
months?

HTH

Sharkbyte
 
D

Douglas J Steele

=DateAdd("m", 6, [Forms]![TblStaff]![StartDate])


--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


Sharkbyte said:
I think you may just be missing the [Forms] qualifier. So your statement
would look like this:

=[Forms]![TblStaff]![StartDate]+186

Although, wouldn't 182 or 183 be a little more accurate a number, for six
months?

HTH

Sharkbyte


owl37 said:
Hi,
I have create a text box in a subform.
I want to take the startdate from the main form (tblstaff) and add 6 months
to calculate an expected end date.
I have tried this expression:
=[TblStaff]![StartDate]+186

However I keep getting Name# in the field.
Any suggestions?
Thanks.
 

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