Hi. I have a combo box that is based on a view. The combo displays a
beginning time and an end time for a class. I have the datetime field
converted so that it displays only the time as such: CONVERT(nchar(20),
dbo.tblClasses.BegTime, 108) AS Beg_Time. This displays the time in
military format like 13:00:00. I would like it to show 1:00 PM instead.
Anyone know how to do this? Thanks.
Jenn
Hi JEM,
try this
----
RIGHT(CONVERT(varchar,dbo.tblClasses.BegTime, 0),7)
----
bye

Signature
Giorgio Rancati
[Office Access MVP]
> Hi. I have a combo box that is based on a view. The combo displays a
> beginning time and an end time for a class. I have the datetime field
[quoted text clipped - 4 lines]
>
> Jenn
JEM - 01 Dec 2005 17:53 GMT
JEM - 01 Dec 2005 20:20 GMT
Hi again. I wonder if you would have another quick solution for me...in
the same combo box, i show the cost for the class which is a money
column. In the display of the combo box it shows fine: $250.00. But,
on my form, i have an unbound text box that displays the cost after a
class is chosen from the combo box. But, it is not displaying it
properly, it is showing 250. I formatted the text box as currency and
even tried using a custom format $###.00 but i still just get 250. Any
ideas?
giorgio rancati - 02 Dec 2005 11:17 GMT
Hi JEM.
Put in textbox's controlsource
----
=Val(Str([ComboBox].[Column](1)))
----
(check column number)
and put Currency in its Format properties
Bye

Signature
Giorgio Rancati
[Office Access MVP]
> Hi again. I wonder if you would have another quick solution for me...in
> the same combo box, i show the cost for the class which is a money
[quoted text clipped - 4 lines]
> even tried using a custom format $###.00 but i still just get 250. Any
> ideas?
giorgio rancati - 02 Dec 2005 11:27 GMT
ops.
It's sufficient
----
=Val([ComboBox].[Column](1))
----
bye

Signature
Giorgio Rancati
[Office Access MVP]
giorgio rancati - 02 Dec 2005 11:54 GMT
ops.
In US currency it's sufficient
----
=Val([ComboBox].[Column](1))
----
bye
--
Giorgio Rancati
[Office Access MVP]
JEM - 02 Dec 2005 17:41 GMT