Click to See Complete Forum and Search --> : currency in combobox


freek
July 14th, 1999, 07:25 AM
I have to calculate how mutch a person has to be paid, this depence on several things like age, ... .
Now the calculation is not the problem, but the result of that calculation is a float and has to be converted to currency. To do that I use the function CCur(), this works without a problem for the database itself. But when I try to view that field (that I just calculated) in a combobox it gives the error "3077 Syntax error (comma) in expression". I use the European standards for the currency (. as digit grouping symbol and , as decimal symbol)
Does someone know anything more about this?

Lothar Haensler
July 14th, 1999, 07:36 AM
in order to display the currency value in a combobox use the Additem method and pass a String as in
combo1.additem CStr(yourCurrencyValue)
or use the Format function to format your currency value accordingly.

freek
July 14th, 1999, 07:44 AM
the combobox gets its values from a query, not from a list i edited.
strange enough he displays it correctly, but when it is selected he gives that strange error.
thanks for your response