Results 1 to 5 of 5
  1. #1
    Join Date
    May 2013
    Posts
    2

    Unanswered: ms-Access 2003 Table Data Type

    Hello, I am new to the forum so I apologize up front if I miss a protocol. I am having trouble with formatting data that I have imported from a .txt file. The data has all come across as text (obviously) and there are number fields that I am wanting to convert. I have tried every combination I can think of to get the data to display what I am looking for with no luck.

    My data comes in like
    6.94
    as text when I try to convert to a number format with two decimal places it is converting to
    7
    What is the proper combination of Data Type & Format to get my 6.94 to stay 6.94 as a number?

  2. #2
    Join Date
    Sep 2006
    Location
    Surrey, UK
    Posts
    994
    Provided Answers: 2
    How are you trying to convert it? What is the data type of the destination field?
    10% of magic is knowing something that no-one else does. The rest is misdirection.

  3. #3
    Join Date
    Jan 2005
    Posts
    146
    To convert text to to a decimal number use CDbl("6.94"). If your setting up a table field, choose Double as the number format if you want to save decimal, integer automatically rounds to the nearest integer.

  4. #4
    Join Date
    May 2013
    Posts
    2
    billmeye!!! That was it!!! Thanks!

  5. #5
    Join Date
    Jan 2005
    Posts
    146
    Glad it worked.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •