cmdAppointment on frmMain opens frmAppointmentSet which has 2 controls:
(1) oleDate: an MSCAL.Calendar.7
(2) fraType: an Option Group with checkBoxes (3 to choose from: (100) Initial Appointment; (200) Followup Appointment; (300) Cancel
frmAppointmentSet is closed by code placed on the Click event of fraType which stores the variable values in a Public Sub module for later usage. frmAppointmentSet Load Event runs the sub that I've attached, essentially assigning a default date to Me.oleDate.
If I do not click oleDate, the default assignment succeeds. If I click a day date on oleDate, the newly assigned date succeeds. However, selecting only a new year from the MSCAL's built-in dropdown without then clicking on a day-number sets Me.oleDate = 0. Same failure on the month combo.
What events fire in these built-ins? I'd add the default mm/dd to year drop-down selections "after update".
Private Sub Form_Load()
'place and size the popup form
DoCmd.MoveSize 3.4 * 1440, 5.7 * 1440, 3.6 * 1440, 3.75 * 1440
'default callback date to Monday of next week
intWeekday = Weekday(Date, vbSunday) 'gets day number of current date
If intWeekday >= 2 Then 'finds relative weekday position of current date vs. Monday (e.g. Tue=-1)
intWeekday = 2 - intWeekday 'sets offset variable used below
Me.oleDate = Now() + 7 + intWeekday 'offsets current date to this Monday, advances result 7 days (next Mon)