• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 742
  • Last Modified:

Access 2007 vba convert text to decimal

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
glomo82
Asked:
glomo82
  • 4
  • 2
1 Solution
 
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)Commented:
csng("32.1")
returns
32.1 numeric

mx
0
 
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)Commented:
CSng(YourField)  to be exact
0
 
GRayLCommented:
CDbl(myFld,"#.0")
0
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)Commented:
But why change to Double that takes the storage ?
0
 
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)Commented:
> That takes twice the storage ?
0
 
GRayLCommented:
I was never told the value could not exceed 32768
0
 
glomo82Author Commented:
Thanks a bunch
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now