--------------------------------------------------------------------------------
I have a form which has two combo boxes start Date and End Date and I am using a calendar activeX control. Anyway I have added the code below where an error is been generated. I have a check that makes sure that the end date is after the start date and if the end date isnt after the start date then an error message is displayed which is fine (that works great). But when the error message displays if you click OK on the message box to continue a RUN TIME error appears stating "cant move the focus to the
control cboJobDetailsEndDate"
can anyone help please???
I have added cboDate as a global variable
Dim cboDate As comboBox
Private Sub ocxCalendar_Click()
cboDate.Value = ocxCalendar.Value
cboDate.SetFocus
ocxCalendar.Visible = False
Set cboDate = Nothing
End Sub
I have a form which has two combo boxes start Date and End Date and I am using a calendar activeX control. Anyway I have added the code below where an error is been generated. I have a check that makes sure that the end date is after the start date and if the end date isnt after the start date then an error message is displayed which is fine (that works great). But when the error message displays if you click OK on the message box to continue a RUN TIME error appears stating "cant move the focus to the
control cboJobDetailsEndDate"
can anyone help please???
I have added cboDate as a global variable
Dim cboDate As comboBox
Private Sub ocxCalendar_Click()
cboDate.Value = ocxCalendar.Value
cboDate.SetFocus
ocxCalendar.Visible = False
Set cboDate = Nothing
End Sub