Bill,
The source is an xml download and the fields are actually costs of cell phone charges. We tried the cDbl and clng and we did not get any results needed.
Jim Wagner
________________________________
________________________________
From: Bill Mosca <wrmosca@comcast.net>
To: MS_Access_Professionals@yahoogroups.com
Sent: Tuesday, September 27, 2011 2:34 PM
Subject: [MS_AccessPros] Re: Convert a number in a text field to a number in a number field
FYI - Val() will return the first number it "sees" and stops at the first non-numeric character. For example, Val("123 Main St") returns 123. That might not be exactly what is needed here.
If the text is pure numeric in alpha form CDbl() or CLng() might be what is needed.
Jim - What is the source of the import? It sounds like an Excel sheet which is notorious for numbers being imported as text if the first row has text in the column.
Bill
--- In MS_Access_Professionals@yahoogroups.com, "Terence" <buffalome90210@...> wrote:
>
> Iv'e always used the Val function
>
> example
> mynumber = Val("123") results in the the numeric equivalent.
> Terence
>
> --- In MS_Access_Professionals@yahoogroups.com, "luvmymelody" <luvmymelody@> wrote:
> >
> > Hello,
> >
> > We have a download that gets imported into the database with fields that have numbers in them yet the fields data type is Text. Is there a simple way of formatting the text field so that the number is really a number? We need it to be a number so we can sum them.
> >
> > Thank You
> >
> > Jim Wagner
> >
>
[Non-text portions of this message have been removed]
Selasa, 27 September 2011
Re: [MS_AccessPros] Re: Convert a number in a text field to a number in a number field
__._,_.___
MARKETPLACE
.
__,_._,___
Langganan:
Posting Komentar (Atom)
Tidak ada komentar:
Posting Komentar