Currency format won't show in form

M

Mishanya

In my form I have combo cboRoom based on query wich takes room' properties
(ID, type, price) from tblRoom. The combo shows RoomType property.
I defined the next textbox' control-source as =cboRoom.column(2) so it shows
the room' price.
In the tblRoom the Price field is defined as currency in both Type and
Format properties and so it comes out in the table ($100 for example).
Yet in my form I only get the number 100 with no currency format ($ sign).
I suppose it happens due to the control-source definition wich somehow can't
"draw" the field format property.
What should be done?
 
D

Douglas J. Steele

Try using

=CCur(cboRoom.column(2))

or

=Format(cboRoom.column(2), "Currency")
 
M

Mishanya

Hi Douglas
=CCur(cboRoom.column(2))
did the job alright.
Can You explain, for the general knowledge,why does it require additional
formatting, if the value is already formatted in the table? Does it have to
be?

Thanks, Misha.
 
D

Douglas J. Steele

There's a difference between how a value's stored and how it's formatted. As
far as I remember, when you refer to the element in the combo box, you're
only getting the reference to its value, not its format.
 
M

Mishanya

thank You

Douglas J. Steele said:
There's a difference between how a value's stored and how it's formatted. As
far as I remember, when you refer to the element in the combo box, you're
only getting the reference to its value, not its format.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top