Currency symbol question

R

Rli

Hi all,(sorry for posting this question before in the wrong group)
I am having trouble with my form fields with currency format.
When one chooses "currency" in the format property of a field, it pics up the
regional settings of windows (euro in my case).
So running the form the form field shows 1,00 € for instance.

Now i save the form and quit the database and transport this database to
another computer with different regional settings (dollars for example)(or i
change my regional settings on my computer). Now i would like the database to
pic up automatically those settings and display
the form field as 1.00 $

But it does not....when saving the form on the 'euro'machine the format
property is actually saved as
#'##0.00 €;-#'##0.00 €
so hard coding the euro-sign (but the decimal comma is automatically changed
in a dot however????)
Am i wright, Is there a way to do this correctly ?
 
B

Brendan Reynolds

Instead of specifying the format in design view, set it programmatically in
the Open event of the form ...

Private Sub Form_Open(Cancel As Integer)

Me.TestNum.Format = "Currency"

End Sub
 
R

Rli

Perfect....
thank you very much...

Brendan Reynolds said:
Instead of specifying the format in design view, set it programmatically in
the Open event of the form ...

Private Sub Form_Open(Cancel As Integer)

Me.TestNum.Format = "Currency"

End Sub
 
J

James

Hello,

How can I do that for a Combo Box if one of the fields is Currency?

Thanks

James
 
J

James

Hi.
the combo box has text then a price coloum. I format the price in Currency
so it shows £ but when I take it to another computer that is in $ is still
displays £. I look at the format and it has changed to £#,###.00 when I want
it to just select the format from Currency.

For all text boxes i have done as Brendan sugested and it works great but
this combo box displays text so it cannot be formated, but one of the coloums
when it is in drop down mode needs to be.

Is there something I can do in the SQL record source to format a field?

James
 
B

Brendan Reynolds

You could build the SQL statement using the Format() function and assign it
to the Row Source property in the Form_Open event procedure, similarly to
what you did with the text box Control Source properties ...

Private Sub Form_Open(Cancel As Integer)

Me.Combo0.ColumnCount = 2
Me.Combo0.ColumnWidths = "1cm;1cm"
Me.Combo0.RowSource = "SELECT OrderID, Format$(Freight, ""Currency"")
FROM Orders"

End Sub
 

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