B
Beeyen
Validation and Popup Calendar
I have a popup calendar (compliments of Mr. Allen Browne) which I would like
to use as the only mean to enter the date and time in the adjacent field and
prevent manually entering of any information in the field, other than what is
selected with the popup calendar. Can the Validation rule be a means for
this result can be achieved? The field, from which the popup calendar date
and time is entered, has a control source and name called Date Received. The
calendar code is noted below.
Thanks for the assistance.
Calendar Event Procedure
Public gtxtCalTarget As TextBox 'Text box to return the date from the
calendar to.
Public Function CalendarFor(txt As TextBox, Optional strTitle As String)
'On Error GoTo Err_Handler
'Purpose: Open the calendar form, identifying the text box to return
the date to.
'Arguments: txt = the text box to return the date to.
' strTitle = the caption for the calendar form (passed in
OpenArgs).
Set gtxtCalTarget = txt
DoCmd.OpenForm "frmCalendar", windowmode:=acDialog, OpenArgs:=strTitle
Exit_Handler:
Exit Function
Err_Handler:
MsgBox "Error " & Err.Number & " - " & Err.Description, vbExclamation,
"CalendarFor()"
Resume Exit_Handler
End Function
Public Function LogError(lngErr As Long, strDescrip As String, strProc As
String, _
Optional bShowUser As Boolean = True, Optional varParam As Variant)
'Purpose: Minimal substitute for the real error logger function at:
If bShowUser Then
MsgBox "Error " & lngErr & ": " & strDescrip, vbExclamation, strProc
End If
End Function
On Click
=CalendarFor([Date Recieved],"Calendar")
I have a popup calendar (compliments of Mr. Allen Browne) which I would like
to use as the only mean to enter the date and time in the adjacent field and
prevent manually entering of any information in the field, other than what is
selected with the popup calendar. Can the Validation rule be a means for
this result can be achieved? The field, from which the popup calendar date
and time is entered, has a control source and name called Date Received. The
calendar code is noted below.
Thanks for the assistance.
Calendar Event Procedure
Public gtxtCalTarget As TextBox 'Text box to return the date from the
calendar to.
Public Function CalendarFor(txt As TextBox, Optional strTitle As String)
'On Error GoTo Err_Handler
'Purpose: Open the calendar form, identifying the text box to return
the date to.
'Arguments: txt = the text box to return the date to.
' strTitle = the caption for the calendar form (passed in
OpenArgs).
Set gtxtCalTarget = txt
DoCmd.OpenForm "frmCalendar", windowmode:=acDialog, OpenArgs:=strTitle
Exit_Handler:
Exit Function
Err_Handler:
MsgBox "Error " & Err.Number & " - " & Err.Description, vbExclamation,
"CalendarFor()"
Resume Exit_Handler
End Function
Public Function LogError(lngErr As Long, strDescrip As String, strProc As
String, _
Optional bShowUser As Boolean = True, Optional varParam As Variant)
'Purpose: Minimal substitute for the real error logger function at:
If bShowUser Then
MsgBox "Error " & lngErr & ": " & strDescrip, vbExclamation, strProc
End If
End Function
On Click
=CalendarFor([Date Recieved],"Calendar")