Adding Years!

J

Joe Bloggs

Thanks for all the help so far.
I have another snag.....
On a subform I have a field called txDate, with the following control
source.... =[Forms]![frmPersonnel]![txDateMain]

This gives a date of when the persons contract is up. I have another field
in this subform that has a dropdown list of 0 to 10 for how many years
extension to the contract he has. This is called 2oe.

So that the txDate field shows the correct termination date, I want to add
the two fields together.

I came up with....:
=DateAdd("yyyy",[2oe],[Forms]![frmPersonnel]![txDateMain])

but it does not work. How can I add them succesfully?

Many thanks again for the past solutions, hopefully you will have an answer
for this!!

Cheers now

Joe
 
K

Ken Snell

When you say it doesn't work, do you get the wrong answer? do you get an
error? do you get nothing at all?

Are you sure that your combo box 2oe is bound to the column that holds the
number of years?

Is this expression in the control source of the txtDate control (not field)
in the subform? What is the name of the combo box (is it 2oe?)?

I'm guessing that it has something to do with your references to controls
vs. fields and how the combo box is set up....

Please provide more info.
 

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