I have an activex calender control opening to make entering dates easier for users. The calender opens onclick in the text box. The date is selected and is entered in the field but i get the following error message "run time error 2165, you can't hide a control that has the focus".
The code I entered is:
Private Sub Calendar_Click()
ADate.Value = Calendar.Value
Calendar.Visible = False
ADate.SetFocus
End Sub
Private Sub ADate_Enter()
'Show Calendar and set its date.
Calendar.Visible = True
Calendar.SetFocus
End Sub
can anyone tell me where I am going wrong?
The code I entered is:
Private Sub Calendar_Click()
ADate.Value = Calendar.Value
Calendar.Visible = False
ADate.SetFocus
End Sub
Private Sub ADate_Enter()
'Show Calendar and set its date.
Calendar.Visible = True
Calendar.SetFocus
End Sub
can anyone tell me where I am going wrong?