I have a form which I am use as bus ticket reservation in my database, in that form I have two date fields as going date and return date, I want to use ms activex calendar control for date selection but it gives the error "Object required" in line " cboOriginator.Value = Me.ocxcalendar.Value " ; whereas I have same code in another form in same database which works fine....I am fully stuck and frustrated with this one..kindly help

Following is complete code in all three objects :

from date object:
Private Sub dtfrom_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
Set cboOriginator = dtfrom
Me.ocxcalendar.Visible = True
Me.ocxcalendar.SetFocus
If Not IsNull(cboOriginator) Then
Me.ocxcalendar.Value = cboOriginator.Value
Else
Me.ocxcalendar.Value = Date
End If
End Sub

to date object:
Private Sub dtto_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
Set cboOriginator = dtto
Me.ocxcalendar.Visible = True
Me.ocxcalendar.SetFocus
If Not IsNull(cboOriginator) Then
Me.ocxcalendar.Value = cboOriginator.Value
Else
ocxcalendar.Value = Date
End If
End Sub

Calender object:
Private Sub ocxcalendar_Click()
cboOriginator.Value = Me.ocxcalendar.Value
cboOriginator.SetFocus


ocxcalendar.Visible = False
Set cboOriginator = Nothing
End Sub

Let me repeat that I have same code in another form of same database which works fine, but I don't know why is it stuck in this form.