When I use in a procedure to put in 23,45 the part after the comma stays 00.(23,00) For example: number = 23,45 gives 23,00. Its is in a floating number field with the output pattern #.,##, Also number = val(“23,45”) gives 23,00. What have I to change? This happens in forms and in the datasheet. I am missing something?
The functions in your procedures are expecting numbers to be in the American format. number=val(“23.45”) would put the correct number in your number field, but number=val(“23,45”) sees 23 and 45 as two numbers separated by a comma, and it converts the first one.
Data entry works correctly, but when Panorama uses str( or val( to convert between numbers and text, it follows the American format of decimal points, and commas as thousands separators. The pattern( function will convert numbers to text according to your regional preferences.
Oke, I understand. In panorama 2: I had something similar, but in panorama 6 there was no problem anymore.
So now in the database it has to be in the American format. In the forms I can use other formats by formulas
When I put by hand the numbers there is no problem I can use a comma.
I have to change all fields in all databases with a comma to the American format? Otherwise I can not use procedures?
No, that’s not correct. There is no need to change anything in the data of your database.
I am daily using German currency format ("#.,## €") in floating number fields, and calculations like
Saldo = Soll - Haben
have perfect decimal results.
I am suspecting your target field is not really set to floating number. I am seeing your symptoms when I have the “Saldo” field set to number (integer).
If you procedurally want to calculate e.g. 19% German VAT for a Price, then you would have to enter that percentage in U.S. format e.g.
VAT = Price * 0.19
Thank you For your reply.
Actually the problem has been solved by changing the currency notation in the System Preferences (apple computer) to American and later back to the European notation and the problem is solved. In the datasheet everything is now in the European notation. Only in the formulas I have to use the American notation.