Using ActiveX Controls 772 Figure 21.25. Adding the Calendar control to the Report Criteria form. The code for adding the Calendar control looks like this: Private Sub cmdSetDates_Click() On Error GoTo cmdSetDates_Error If cmdSetDates.Caption = "Set Beginning Date" Then BeginDate = calSetDates.Value cmdSetDates.Caption = "Set Ending Date" Else