[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 248
  • Last Modified:

MS ACCESS - I have numbers stored as TX and so there's no leading '0' aka .9 is not 0.9

How do I format this as a number ?

.9 to 0.9 in the MS Access
0
ghettocounselor
Asked:
ghettocounselor
  • 2
  • 2
2 Solutions
 
Dale FyeCommented:
use the format( ) function, something like:

Format([yourFieldName], "0.0")
0
 
aikimarkCommented:
CDbl(".9")

Open in new window

or
Select CDbl(fieldname) From mytable

Open in new window

0
 
Dale FyeCommented:
unfortunately, the format function actually converts numeric values to a string, so, depending on where you want to use this, you might simply want to set the Format property of the control on the form or report where you are displaying the value.
0
 
aikimarkCommented:
Then apply the Format() function to the numeric value.
0
 
ghettocounselorAuthor Commented:
In the end I'm concatenating a handful of things together from two different systems one with 0.9 and one with .9 to then compare the concatenated strings searching for missing items so I needed the number to match.

both the of the selected solutions do what they are intended to do, i ended up using the CDbl function because it only changed the .9 to 0.9 and not 1 to 1.0 like the Format function, which although not specified initially was something I needed.

Thanks for the help!
0

Featured Post

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!

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