there is a field that contains numbers using . for decimal so i need to
create a field that replace . (dot) to , (comma)
the numbers are like 3 not 3.00 or 3.1 not 3,1 or 3.01 not 3,01 so if there
are number without decimal does not present .
in this case i am using the follow query
UPDATE table SET table.field1 = Replace([field1],".",","), table.field2=
Replace([field2],".",",");
but i need to build a command without run that query
Michel Walsh - 06 Jul 2006 23:38 GMT
Hi,
Are you sure this is not simply a question of FORMATTING your number? if so,
your numbers are digitals, not strings, and the update is useless since the
table will revert the string to a digital representation (assuming the field
is numeric).
The Cultural (or Regional Setting) of your PC may asks to display a coma,
rather than a dot, for the decimal delimiter. It is considered to be hard on
the user to not respect his/her preference and to force, say, a US dot
delimiter when the user asks for a coma... Sure, that leads to some
interesting kind of bugs, mainly when you use automatic concatenation :
str= ".... " & floatingPointNumber & "..."
because, in:
".... myFunction( " & floatingPointNumber & " ) .... "
a coma will give TWO parameters to myFunction:
" ... myFunction( 0,5 ) ...."
while a dot will give just ONE:
" ... myFunction( 0.5 ) ... "
I don't know the whole story of your case, but be sure you don't use Replace
on a FORMATTED, but numerical, field.
Hoping it may help,
Vanderghast, Access MVP
> there is a field that contains numbers using . for decimal so i need to
> create a field that replace . (dot) to , (comma)
[quoted text clipped - 5 lines]
> Replace([field2],".",",");
> but i need to build a command without run that query
Gary Walter - 07 Jul 2006 00:29 GMT
> there is a field that contains numbers using . for decimal so i need to
> create a field that replace . (dot) to , (comma)
[quoted text clipped - 5 lines]
> Replace([field2],".",",");
> but i need to build a command without run that query
try looking at these:
http://groups.google.com/groups?lnk=hpsg&hl=en&q=Declare+Function+VariantChangeTypeEx