Results 1 to 5 of 5
  1. #1
    Join Date
    Mar 2007
    Location
    Bedfordshire, UK
    Posts
    64

    Unanswered: Converting data type from text to number

    Is it possible to convert from text to number in a query? I have a database in which the user enters numbers, these are stored as text in the table. I would like to bring these into a query and perform calculations on the numbers, but don't know if it's possible to convert the text into numbers to facilitate this.

  2. #2
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    The easiest part of table design is chosing the right data types. Why not store your numbers as... drumroll please...


    Numbers!
    George
    Home | Blog

  3. #3
    Join Date
    Jun 2005
    Location
    Richmond, Virginia USA
    Posts
    2,763
    Provided Answers: 19
    If all the data you have in the field can be interpreted as numerical, you can simply do as George suggested, go into Design View for the table and change the datatype for the field to Numerical.

    If there's some overwhelming reason that it just has to be text, you can use the Val() function to convert it.

    Val(YourFieldName)
    Hope this helps!

    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  4. #4
    Join Date
    Mar 2007
    Location
    Bedfordshire, UK
    Posts
    64
    Quote Originally Posted by Missinglinq
    If all the data you have in the field can be interpreted as numerical, you can simply do as George suggested, go into Design View for the table and change the datatype for the field to Numerical.
    Didn't realise it would be that simple! Thanks.

  5. #5
    Join Date
    Jun 2005
    Location
    Richmond, Virginia USA
    Posts
    2,763
    Provided Answers: 19
    Glad we could help!
    Hope this helps!

    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

Posting Permissions

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