Adding a Calendar to an Access Form

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • neosam
    New Member
    • Mar 2008
    • 47

    Adding a Calendar to an Access Form

    Hi,

    Here I come again with my silly questions.... I am now working on a calendar control and i am able to put in the control and also link it to a field, but i keep getting a error message in VB Script as "You can't assign a value to this object". The code that i have written is :
    Code:
    Private Sub DateCBox_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
    ocxCalendar.Visible = True
    ocxCalendar.SetFocus
    If Not IsNull(DateCBox) Then
        ocxCalendar.Value = DateCBox.Value
    Else
        ocxCalendar.Value = Date
    End If
    End Sub
    Where ocxcalendar is the name of the calendar control and DateCBox is the name of the combo box where the calendar is linked ...
  • neosam
    New Member
    • Mar 2008
    • 47

    #2
    Originally posted by neosam
    Hi,

    Here I come again with my silly questions.... I am now working on a calendar control and i am able to put in the control and also link it to a field, but i keep getting a error message in VB Script as "You can't assign a value to this object". The code that i have written is :
    Code:
    Private Sub DateCBox_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
    ocxCalendar.Visible = True
    ocxCalendar.SetFocus
    If Not IsNull(DateCBox) Then
        ocxCalendar.Value = DateCBox.Value
    Else
        ocxCalendar.Value = Date
    End If
    End Sub
    Where ocxcalendar is the name of the calendar control and DateCBox is the name of the combo box where the calendar is linked ...

    Got it thanks!!!!!!!!

    Comment

    Working...