Also, if you would prefer the calendar to pop up when the Control receives Focus, without the user having to click on it, this bit of code will do that
Code:
Private Sub YourDateFieldName_GotFocus()
DoCmd.RunCommand acCmdShowDatePicker
End Sub
To have it only pop up, on Focus, if the Textbox is empty
Code:
Private Sub YourDateFieldName_GotFocus()
If Nz(Me.YourDateFieldName,"") = "" Then
DoCmd.RunCommand acCmdShowDatePicker
End If
End Sub
Replacing, of course, YourDateFieldName with the actual name of your Control...which, has been said, needs to be something other than Date...which is a Reserved Word.
Linq ;0)>
The problem with making anything foolproof...is that fools are so darn ingenious!
All posts/responses based on Access 2003/2007