R
randria
Hi, I m using Allen Browne's calendar and it is excellent. Now I want to know
how to use it using codes instead of On Click = CalendarFor([Ctrl]," txt").
this is what I tried
Private Sub SDate_DblClick(Cancel As Integer)
On Error GoTo Err_SDate_Dblclick
Dim prcd As SDate
Dim frmcalendar As Form ' I m not sure if this should be like this.
If Not IsNull(Me.sDate) Then
prcd = Me.Date
DoCmd.GoToRecord , , acNewRec
Me.Date = prcd
Else
If IsNull(Me.Date) Then
frmcalendar = CalendarFor([Sdate],"Set SDate") ' getting error calendarFor
not defined
DoCmd.OpenForm frmcalendar, acNormal
End If
End If
Exit_SDate_DblClick:
Exit Sub
Err_SDate_DblClick:
MsgBox Err.Description
Resume Exit_SDate_DblClick
End Sub
many thanks/
how to use it using codes instead of On Click = CalendarFor([Ctrl]," txt").
this is what I tried
Private Sub SDate_DblClick(Cancel As Integer)
On Error GoTo Err_SDate_Dblclick
Dim prcd As SDate
Dim frmcalendar As Form ' I m not sure if this should be like this.
If Not IsNull(Me.sDate) Then
prcd = Me.Date
DoCmd.GoToRecord , , acNewRec
Me.Date = prcd
Else
If IsNull(Me.Date) Then
frmcalendar = CalendarFor([Sdate],"Set SDate") ' getting error calendarFor
not defined
DoCmd.OpenForm frmcalendar, acNormal
End If
End If
Exit_SDate_DblClick:
Exit Sub
Err_SDate_DblClick:
MsgBox Err.Description
Resume Exit_SDate_DblClick
End Sub
many thanks/