Rocky Smolin at Beach Access Software
rockysmolin at bchacc.com
Mon Nov 10 08:51:33 CST 2008
Max: I tried the Replace but I had the arguments scrambled. Working now. Thanks. And yes, you're right - the field should be converted to numeric. Legacy systems (sigh)... Rocky Smolin Beach Access Software 858-259-4334 www.e-z-mrp.com www.bchacc.com -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Max Wanadoo Sent: Monday, November 10, 2008 6:39 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Text to Number Conversion Problem You could just do a replace... myStr = replace(myStr,",","") (That is a comma withing quotes to search for and a nothing withing quotes to replace it with - if that makes sense). I would say that numeric fields are best definded as text when the intention is never to do calculations on them. If you are going to do a calculation, then define them as numeric. Max On Mon, Nov 10, 2008 at 1:56 PM, Rocky Smolin at Beach Access Software < rockysmolin at bchacc.com> wrote: > 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 > > > > > > > > Rocky Smolin > > Beach Access Software > > 858-259-4334 > > www.e-z-mrp.com <http://www.e-z-mrp.com/> > > www.bchacc.com <http://www.bchacc.com/> > > > > > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com