Combo box date format changes when item selected from list

  • Thread starter Thread starter RobGMiller
  • Start date Start date
R

RobGMiller

Access 2003.

The combo box format setting is dd-mmm-yyyy.
The computer short date setting is dd/mm/yy.

The combo box value is set programmatically with the content of a date
variable and it appears as dd-mmm-yyy.

The combo box rowsource is filled with a formatted list (dd-mmm-yyyy) which
is a SQL statement with an embedded format statement and the list appears
correctly.

ex: Select format(fieldname,"dd-mmm-yyy") from tablename;

When an item in the list is selected the result display in the Combo box is
dd/mm/yy. How can the result from a selection be displayed using the
dd-mmm-yyyy format?
 
Sounds as though your combo box is bound to a field in the form's underlying
recordset, so that when a value is being displayed, it's getting the form
from the underlying field, not the combo box.

To remedy, set the Format property of the combo box to dd-mmm-yyyy
 
Thanks for the reply Doug,

The combo box is not bound to an underlying recordset. The form is only used
to select criteria used to open reports. The format field was already set to
dd-mmm-yyyy.
 
Thanks for trying,


I got around the issue by leaving the format property of the combo box blank
and using the resulting formatted text as a date in part of a subsequent SQL
Statement.

Thanks again.
 
Back
Top