CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 1999
    Posts
    104

    currency in combobox

    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?


  2. #2
    Join Date
    May 1999
    Posts
    3,332

    Re: currency in combobox

    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.


  3. #3
    Join Date
    Jul 1999
    Posts
    104

    Re: currency in combobox

    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


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured