Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Access 2007 vba convert text to decimal

Posted on 2011-02-28
7
Medium Priority
?
740 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 1000 total points
ID: 35002997
CSng(YourField)  to be exact
0
 
LVL 44

Expert Comment

by:GRayL
ID: 35003355
CDbl(myFld,"#.0")
0
Industry Leaders: 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!

 
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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Traditionally, the method to display pictures in Access forms and reports is to first download them from URLs to a folder, record the path in a table and then let the form or report pull the pictures from that folder. But why not let Windows retr…
Instead of error trapping or hard-coding for non-updateable fields when using QODBC, let VBA automatically disable them when forms open. This way, users can view but not change the data. Part 1 explained how to use schema tables to do this. Part 2 h…
The viewer will learn how to simulate a series of sales calls dependent on a single skill level and learn how to simulate a series of sales calls dependent on two skill levels. Simulating Independent Sales Calls: Enter .75 into cell C2 – “skill leve…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

670 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