How to change the format from number to text in a query

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • perryk

    #1

    How to change the format from number to text in a query

    I have a Make Tabel Query in Access 2003 where one of the data elements in the source table contatains numbers.

    I need to change the number to Text formating, and add a leading "0" to any single digit numbers.

    The Table that is created from this query is then linked to another table with "Numbers" that are already formatted as Text with leading "0" for single digits.
  • Mariostg
    Contributor
    • Sep 2010
    • 332

    #2
    CStr(x) will convert x to a String.
    To add a leading 0, you could do something like
    iif(len(x)=1,CS tr(0 & x),CStr(x))

    Comment

    Working...