-
Convert text number to a number in a MS Access.
Does anyone know how to convert a text string that represents a number
to a number in a MS Access query. I'm using 2000 in an NT environment.
Thanks in advance for any help.
James
-
Re: Convert text number to a number in a MS Access.
"James" <tbt102@hotmail.com> wrote in message <news:3b3d106c$1@news.devx.com>...
> Does anyone know how to convert a text string that represents a number
> to a number in a MS Access query. I'm using 2000 in an NT environment.
If you're talking about turning "500" into 500, check out Val, CDbl,
CInt, CCur, CDec, and other conversion functions. Or are you talking
about converting strings such as "five hundred" to 500?
--
Joe Foster <mailto:jfoster@ricochet.net> Got Thetans? <http://www.xenu.net/>
WARNING: I cannot be held responsible for the above They're coming to
because my cats have apparently learned to type. take me away, ha ha!
-
Re: Convert text number to a number in a MS Access.
I'm talking about turning "500" into 500
I'll try the functions you listed in your posting. Thanks.
"Joe \"Nuke Me Xemu\" Foster" <joe@bftsi0.UUCP> wrote:
>"James" <tbt102@hotmail.com> wrote in message <news:3b3d106c$1@news.devx.com>...
>
>> Does anyone know how to convert a text string that represents a number
>> to a number in a MS Access query. I'm using 2000 in an NT environment.
>
>If you're talking about turning "500" into 500, check out Val, CDbl,
>CInt, CCur, CDec, and other conversion functions. Or are you talking
>about converting strings such as "five hundred" to 500?
>
>--
>Joe Foster <mailto:jfoster@ricochet.net> Got Thetans? <http://www.xenu.net/>
>WARNING: I cannot be held responsible for the above They're coming
to
>because my cats have apparently learned to type. take me away,
ha ha!
>
>
-
Re: Convert text number to a number in a MS Access.
"James" <tbt102@hotmail.com> wrote:
>
>Does anyone know how to convert a text string that represents a number
>to a number in a MS Access query. I'm using 2000 in an NT environment.
>
>Thanks in advance for any help.
>
>James
Hi, James
Here is the answer:
This example uses the Val function to return the numbers contained in a string.
Dim MyValue
MyValue = Val("2457") ' Returns 2457.
MyValue = Val(" 2 45 7") ' Returns 2457.
MyValue = Val("24 and 57") ' Returns 24.
Let me know if you need anything else.
Best
Zack_NYC
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks