I want to populate a field from a date, to show a future year in anoter field on a form. I then want to be able to use this field as the basis for searches.
I am using the formula =DatePart("yyyy",[DateTo]) + ([Years]+1)
DateTo is the date I enter and I want to change this to the year (i.e. 1/10/1995 becomes 1995, but still displays the full date in the DateTo field), and add the number of years listed in [Years](from another table) + 1.
Any ideas how I can do this in code. I got it to work once using macros and extra text boxes but it looks tacky and cumbersome.
I've been playing with this for several days without any joy.
Thanks in advance.
I am using the formula =DatePart("yyyy",[DateTo]) + ([Years]+1)
DateTo is the date I enter and I want to change this to the year (i.e. 1/10/1995 becomes 1995, but still displays the full date in the DateTo field), and add the number of years listed in [Years](from another table) + 1.
Any ideas how I can do this in code. I got it to work once using macros and extra text boxes but it looks tacky and cumbersome.
I've been playing with this for several days without any joy.
Thanks in advance.