[AccessD] Text to Number Conversion Problem

Gustav Brock Gustav at cactus.dk
Mon Nov 10 08:05:58 CST 2008


Hi Rocky

Wouldn't CLng() convert that correctly?
Or use Replace to strip the comma.

/gustav

>>> rockysmolin at bchacc.com 10-11-2008 14:56 >>>
Dear List:

Legacy system.  The previous designed defined a numeric field as text.
Don't know why. BUT...

When the field contains a comma it doesn't convert right when converted to
numeric (for use on a report in this case).

IOW, the user enter 39000 and everything's OK.  The user enters 39,000 and
the report says 39. Drops everything after the comma.

The right solution, of course, is to convert the back end to numeric.  And I
may urge him to do this.  Have to convert the data as well making sure that
39,000 converts to 39000 and not 39.

Nevertheless, short of doing the 'right' thing, is there a way to get the
text 39,000 to convert to the numeric 39000 instead of 39?

MTIA






More information about the AccessD mailing list