ActiveX Control: Calendar

C

Confused Slug

I am using the Calendar Control 11.0 on a form to allow a user to 'pick' a
date. How can i have the selected date automatically update a field where its
Control Source is set to the Calendar, without having to have a intermediate
step such as an update button. I can see the 'Value' changing in the
Properties for the Calendar as soon as a new date is selected but the
related field does not update.
 
L

Linq Adams via AccessMonster.com

You don't set the texbox Control Source to the calendar, you set it to
whatever field you want the date saved in in the underlying table. Then use
code like this, replacing the control names with your actual names.

Private Sub YourCalendarName_AfterUpdate()
Me.TargetField = Me.YourCalendarName
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top