VBA calendar control with two text boxes! (1 Viewer)

DanJames

Registered User.
Local time
Yesterday, 23:31
Joined
Sep 3, 2009
Messages
78
Hi,

I want the calendar to show the date in the field [Next Payment Due] - whenever this value changes, the calendar date should change accordingly.

I want the calendar to be assigned to a text box (txtCalDate), so this would also contain the date of [Next Payment Due].

However, If the calendar date is changed (on the calendar), I want txtCalDate to show this date, but [Next Payment Due] to stay as it's original value. Next Payment Due can only change the value, but not be changed itself.

So I presume VBA would be needed to say when [Next Payment Due] is changed, make calendar this date. And then to simply assign the calendar to txtCalDate so if calendar is changed, this will change with the new date.

I hope this is understandable - If you can help I will greatly appreciate it!

Thanks in advance :)
 

mdlueck

Sr. Application Developer
Local time
Today, 02:31
Joined
Jun 23, 2011
Messages
2,631
A2007 has a calendar option built into the core text field control. I use this to enforce entry of only valid dates. No longer is it necessary to mess with the OCX additional controls... which do not port upwards to Access x64.

You can wire to events of the control VBA code to refresh other controls upon that field value changing.
 

DanJames

Registered User.
Local time
Yesterday, 23:31
Joined
Sep 3, 2009
Messages
78
Thanks Guys! I used the website above and it helped me complete my aim!
 

Users who are viewing this thread

Top Bottom