I was reviewing another order database and the form had a calendar button beside a date field to select the date.
Where does one find this button and how is it entered into the form?
Please see attached image.
CementCarver
I was reviewing another order database and the form had a calendar button beside a date field to select the date.
Where does one find this button and how is it entered into the form?
Please see attached image.
CementCarver
See if this helps:
http://msdn.microsoft.com/en-us/libr...ffice.14).aspx
Robeen, thanks for the link and explanation.....CementCarver
I have not used the Calendar Control in Access 2010 - so please let us know if the instructions work for you.
Thanks & All the Best!!
Will Do...CC
Don't have the current .ocx. Will investigate download material and get back to you.
CC
Versions 2007 and later have a DatePicker that, by default, will automatically appear when a Field defined as Date/Time is entered.
You can actually have the calendar 'pop up' when the Control has Focus, rather than requiring that the user click on the icon to pop the calendar up, with code like
Code:Private Sub DateField_GotFocus() DoCmd.RunCommand acCmdShowDatePicker End Sub
To have it only pop up, on Focus, if the Textbox is empty:
Code:Private Sub DateField_GotFocus() If Nz(Me.DateField,"") = "" Then DoCmd.RunCommand acCmdShowDatePicker End If End Sub
And while it doesn't have a Property Pane, using the DatePicker is treated as if the data were physically entered, which means that you can attach actions to the usual Events of the Control, such as its BeforeUpdate and AfterUpdate events.
You could, for example, insure that any date entered is not in the past, and if this rule is violated, pop a warning message to the user, Cancel the Field update, and pop up the DatePicker once again, ready for a correct date to be entered:
Code:Private Sub DateField_BeforeUpdate(Cancel As Integer) If Me.DateField < Date Then MsgBox "Invalid Date!" Cancel = True DoCmd.RunCommand acCmdShowDatePicker End If End Sub
Linq ;0)>
Thanks Missinglinq. Will investigate.
Cc
For what it's worth ---- I have used an unbound textbox, and set the default to General Date and a DatePicker will be placed next to the textbox on the form.
Thx Orange.