1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
| Option Compare Database
Option Explicit
Public Property Let CalDate(datDate As Date)
Me!ocxCal = datDate
End Property
Public Property Get CalDate() As Date
CalDate = Me!ocxCal
End Property
Private Sub cmdCancel_Click()
DoCmd.Close acForm, Me.Name
End Sub
Private Sub cmdNextMonth_Click()
Me!ocxCal.NextMonth
Me.Repaint
End Sub
Private Sub cmdNextYear_Click()
Me!ocxCal.NextYear
Me.Repaint
End Sub
Private Sub cmdOK_Click()
Me.Visible = False
End Sub
Private Sub cmdPrevMonth_Click()
Me!ocxCal.PreviousMonth
Me.Repaint
End Sub
Private Sub cmdPrevYear_Click()
Me!ocxCal.PreviousYear
Me.Repaint
End Sub
Private Sub cmdToday_Click()
Me!ocxCal.Today
End Sub
Private Sub Form_Load()
If Not IsNull(Me.OpenArgs) Then
Me.CalDate = Me.OpenArgs
End If
End Sub
Private Sub ocxCal_DblClick()
Call cmdOK_Click
End Sub |
Partager