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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|