Solved

Access 2007 vba convert text to decimal

Posted on 2011-02-28
7
739 Views
Last Modified: 2013-11-27
I have several text (50) records that are imported thru an ODBC connection that reads ie 32.9.   I would like to convert to a number with one decimal point.   How do I convert it in VBA.
0
Comment
Question by:glomo82
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
7 Comments
 
LVL 75
ID: 35002994
csng("32.1")
returns
32.1 numeric

mx
0
 
LVL 75

Accepted Solution

by:
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform) earned 250 total points
ID: 35002997
CSng(YourField)  to be exact
0
 
LVL 44

Expert Comment

by:GRayL
ID: 35003355
CDbl(myFld,"#.0")
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 75
ID: 35003368
But why change to Double that takes the storage ?
0
 
LVL 75
ID: 35003376
> That takes twice the storage ?
0
 
LVL 44

Expert Comment

by:GRayL
ID: 35003397
I was never told the value could not exceed 32768
0
 

Author Closing Comment

by:glomo82
ID: 35003473
Thanks a bunch
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
Suggested Courses

617 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question