Yesterday something strange has happened once I tried to type a number from a numeric keypad that has "." instead of ",".

Since I'm in Europe and we use "comma" to determine decimals, once I used the point the value appears as a full number es:

Typed 120.00 and got 12000. And up to this all was ok, I prevented the error to happen again and I used during input this formula

Substitute ( Self ; "." ; "," )

From now on any kind of comma or point will be interpreted correctly.

All ok up to now.

Then I need to extract some numbers, I I did it with this SQL script:

Sum (

ExecuteSQL (

"SELECT SUM (\"Entrate\")

FROM \"Movimenti\"

WHERE (\"Causale 3\") = ?"

; "" ; "" ; "P9B");

ExecuteSQL (

"SELECT SUM (\"Uscite\")

FROM \"Movimenti\"

WHERE (\"Causale 3\") = ?"

; "" ; "" ; "P9B")*-1

)

and that has happened is that I get a wrong totals number from only those field I inserted with the wrong decimal.

Although I before edited the correct number in the table. In Fact they do display correctly on their Layouts. But NOT in the SQL Global Variable $$P9B

WHY??

It looks as if hidden numbers are used for calculation. I HAVE NO CLUE!!

Can anybody help me?

Thank you

The result of an

ExecuteSQLis alwaystextand number-results form ExecuteSQL always have the"." as decimal-separator. So adjust your formula like this:and it should work just fine.