bradzy88
Take a look at the DateAdd function. Using it, there are 2 ways of doing it, depending on your form structure and the result you want.
If the [DateAdmitted] control is bound, meaning that you are storing the [DateAdmitted] value in your table, then on the AfterUpdate event for [Birthday] put the following code...
Me.DateAdmitted = DateAdd("yyyy",3,[Me.Birthday])
If you are not storing the [DateAdmitted} value in the table, and the [DateAdmitted] control is unbound, you can set the control source of the [DateAdmitted] directly by putting this as its control source...
=DateAdd("yyyy",3,[Me.Birthday])
In either case, set the format property of the [DateAdmitted] to whatever you want to see. If you want to see a short date, select that from the drop down box. If you want a full date, type mmmm dd, yyyy in the format property.
You were close and led me on the right track teh code i used was
Me.DateAdmitted.Value = DateAdd("yyyy", 3, [Birthday])
Me.DateAdmitted.Requery
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.