|
|
Total Access Components Tour: Date Time Picker
Allow users to view and select a date or time in the appropriate
format, and optionally allow a drop-down calendar.


Using the DateTime Picker Control
There are three basic steps involved in using the DateTime Picker control:
-
Insert the control into your form. Use
the Insert|ActiveX Control menu to place the control on your form.
-
Set the appropriate properties. Define
the date or time format and the appearance of the control using the
available properties.
-
Set the Value Set the value of the
control programmatically in VBA code, or bind the control to a date/time
field in a table. To do this, set the form's record source to the
appropriate table, and set the DateTime Picker's control source to the
date/time field.
Customizing Date/Time FormatWhen you set the Format property to Custom, the DateTime
Picker control uses the custom format from that you specify in the
CustomFormat property. For instance, if the CustomFormat property is set
to:
dddd MMM. dd, yyyy
The date would be displayed as:
Friday Dec. 26, 2003Date Time Picker Properties
|
Name |
Description |
|
CustomFormat |
The format to use when the Format property is set to "Custom". |
|
Format |
The format to use: LongDate, ShortDate, Time, or Custom. |
|
ShowCalendar |
True to allow users to use a drop-down calendar to select a
date. |
|
ShowNone |
True to show a check box, which if unchecked, disallows typing
in the DateTime Picker control. Note that when ShowNone is
True, users can still use the Calendar drop-down to select a date.
Set ShowCalendar to False to disable this. |
|
Value |
The Value of the Control, for instance 12/29/2003 5:10:46 PM. |
|