Date() + 3 Months. Now how do I tell Access.

K

Kevbro7189

I know this should be simple but....
I have a Text box that I want to show what date it will be in 3 months.
 
L

Linq Adams via AccessMonster.com

Your post isn't very clear. DO you want the textbox to show the date three
months from the current date, or do you want it to show three months from a
certain date? At any rate, the syntax would be

Me.DateTextbox = DateAdd("m",3,Date)

for three months from the current date. Simply substitute any other given
date for Date() if you want three months from a given date.
 
K

Kevbro7189

I want the Text Box to display the date it will be 3 months from whatever
date the user is using the program.

I tried to use the equation you posted but I get nothing other than #NAME?.
 
J

John W. Vinson

I want the Text Box to display the date it will be 3 months from whatever
date the user is using the program.

I tried to use the equation you posted but I get nothing other than #NAME?.

Set the Control Source property of a textbox on the form to

=DateAdd("m",3,Date())

The code Linq posted works just fine in a VBA module; the syntax is just a bit
different in a form.
 
Top