If date is enter then this feild is +12 months

Starcraft1535

New Member
Joined
Dec 15, 2015
Messages
29
What im trying to do is create a form that allows fro a date to be enter then automatically enter a date 12 months later in other field.

Fields are:

Certified date: Date input
Next Eval: Auto Date 12+ months from Cert date.
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
Don't know if this is conducive to your data types, but I would use the AfterUpdate event for the first control to calculate the date in the second control.
In between the sub/end sub lines, you could put:

If IsDate(Me.1stControlName) Then Me.2ndControlName = DateAdd("yyyy", 1, Me.Text1stControlName)
 
Upvote 0
Don't know if this is conducive to your data types, but I would use the AfterUpdate event for the first control to calculate the date in the second control.
In between the sub/end sub lines, you could put:

If IsDate(Me.1stControlName) Then Me.2ndControlName = DateAdd("yyyy", 1, Me.Text1stControlName)

Im getting syntax error when putting in If IsDate(Me.LastEval) Then Me.NextEval = DateAdd("yyyy", 1, Me.LastEval)
 
Upvote 0
Well, at least you're not getting a 'data type mismatch' error! What you posted looks correct, so post the rest of the event code and indicate the line on which the error occurs. I tested before posting and it worked for me.
 
Upvote 0

Forum statistics

Threads
1,221,829
Messages
6,162,229
Members
451,756
Latest member
tommyw

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top