My form has several textboxes to capture timeline events (dates). To control input of the date I am using a activex calendar control object.
The textbox onclick event is used to display the calendar, set the calendars date value to any previously entered date existing in the field or if null current date, and to set the name of the textbox in the calendars .tag property for use in the calendar's onclick event. At this point, code stops pending calendar's on click or lost focus events.
In the on click event of the calendar I use a select case = calendar.tag to then insert the calendar date into which ever textbox the user clicked.
Problem is I may need to requery or manipulate the text box properties (setting lock property etc) after date is entered etc. I can't figure out how to return to the textbox onclick procedure from the calendars onclick event. Screen.PreviousControl is not useful since focus may change several time is the course of events. I read about creating a public property or passing the control instead of using a very complicated select case procedure but I can't figure out how to make this work. Any suggestions would be appreciated.