C
CEV
I'm using a tabbed control on a form and each tab has a subform. On one of
these the subform will be viewed as a datasheet. There are only 2 fields and
one is a date field. I converted the date field text box into a combo box. I
followed the instructions from fontstuff.com to add the pop-up calendar.
When I click the drop-down to test it, I'm getting a runtime error that
says: database can't move the focus to the control ocxCalendar. I double
checked and the code looks correct with nothing mispelled. Can I still do
this even though the subform is being viewed as a datasheet? It works in my
other subforms that are regular form view. My code is listed below:
Private Sub cboDateDue_MouseDown(Button As Integer, Shift As Integer, X As
Single, Y As Single)
ocxCalendar.Visible = True
ocxCalendar.SetFocus
If Not IsNull(cboDateDue) Then
ocxCalendar.Value = cboDateDue.Value
Else
ocxCalendar.Value = Date
End If
End Sub
Thanks,
Chad
these the subform will be viewed as a datasheet. There are only 2 fields and
one is a date field. I converted the date field text box into a combo box. I
followed the instructions from fontstuff.com to add the pop-up calendar.
When I click the drop-down to test it, I'm getting a runtime error that
says: database can't move the focus to the control ocxCalendar. I double
checked and the code looks correct with nothing mispelled. Can I still do
this even though the subform is being viewed as a datasheet? It works in my
other subforms that are regular form view. My code is listed below:
Private Sub cboDateDue_MouseDown(Button As Integer, Shift As Integer, X As
Single, Y As Single)
ocxCalendar.Visible = True
ocxCalendar.SetFocus
If Not IsNull(cboDateDue) Then
ocxCalendar.Value = cboDateDue.Value
Else
ocxCalendar.Value = Date
End If
End Sub
Thanks,
Chad