Thank you Emilia for your help. Now it works perfectly :)

"Emilia Maxim" <Info@maxim-Software-Service.de> wrote in message
news:d94thvojrbg8bjv37ra1r258eo54tcug17@4ax.com...
> "Sergey Bogdanov" <des@softex.lv> wrote:
>
> >Hello,
> >
> >I've written the following code to convert my "123123,325" to
"123123.325"
> >(dot-separated).
> >
> >Format(NumberCtrl.Value, ".") // still ","
> >Format(NumberCtrl.Value, "#.######") // still ","
> >
> >I suppose that I should set correct mask, but what about universal
solution?
> >The doubles could contain different number of digits after the dot...
> >
> >I've tried to fix it with Replace(NumberCtrl.Value, ",", "."). It works,
but
> >I'm not sure that it's correct solution.
> >
> >I want to use this double in the SQL statement:
> >"UPDATE table SET a = " & mydouble & " WHERE b = 1", but instead of "."
it
> >uses culture-formatted doubles with "," as fraction delimeter:
> >"UPDATE table SET a = 222,1222 WHERE b = 1", must be
> >"UPDATE table SET a = 222.1222 WHERE b = 1"
>
> Sergey,
>
> you can use the built in function BuildCriteria. It is meant to
> construct SQL criteria:
>
> BuildCriteria("a", dbDouble, NumberCtrl)
>
> returns the string:
>
> "a = 222.1222"
>
> if NumberCtlr contains 222,1222
> If you don't specify the comparison operator it uses '=', otherwise
> you could write:
>
> BuildCriteria("a", dbDouble, "<=" & NumberCtrl)
> which gives:
> "a <= 222.1222"
>
> See also Help on BuildCriteria for detailed explanation.
>
> Best regards
> Emilia
>
> Emilia Maxim
> PC-SoftwareService, Stuttgart
> [url]http://www.maxim-software-service.de[/url]