A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Combo box date format changes when item selected from list



 
 
Thread Tools Display Modes
  #1  
Old July 2nd, 2008, 02:06 PM posted to microsoft.public.access.forms
RobGMiller
external usenet poster
 
Posts: 58
Default Combo box date format changes when item selected from list

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?




--
RobGMiller
  #2  
Old July 2nd, 2008, 03:34 PM posted to microsoft.public.access.forms
Douglas J. Steele
external usenet poster
 
Posts: 9,313
Default Combo box date format changes when item selected from list

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

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"RobGMiller" wrote in message
news
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?




--
RobGMiller



  #3  
Old July 2nd, 2008, 06:23 PM posted to microsoft.public.access.forms
RobGMiller
external usenet poster
 
Posts: 58
Default Combo box date format changes when item selected from list

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.


--
RobGMiller


"Douglas J. Steele" wrote:

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

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"RobGMiller" wrote in message
news
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?




--
RobGMiller




  #4  
Old July 2nd, 2008, 10:06 PM posted to microsoft.public.access.forms
Douglas J. Steele
external usenet poster
 
Posts: 9,313
Default Combo box date format changes when item selected from list

Sorry, I'm unable to replicate your problem with an unbound combo box.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)


"RobGMiller" wrote in message
...
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.


--
RobGMiller


"Douglas J. Steele" wrote:

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

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"RobGMiller" wrote in message
news
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?




--
RobGMiller






  #5  
Old July 3rd, 2008, 05:45 AM posted to microsoft.public.access.forms
RobGMiller
external usenet poster
 
Posts: 58
Default Combo box date format changes when item selected from list

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.

--
RobGMiller


"Douglas J. Steele" wrote:

Sorry, I'm unable to replicate your problem with an unbound combo box.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)


"RobGMiller" wrote in message
...
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.


--
RobGMiller


"Douglas J. Steele" wrote:

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

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"RobGMiller" wrote in message
news 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?




--
RobGMiller






 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 04:18 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.