Results 1 to 3 of 3

Thread: access equivalent to Text function
Thanks Thanks: 0 Likes Likes: 0

  1. #1
    Board Regular
    Join Date
    May 2011
    Location
    Raleigh, NC
    Posts
    682
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default access equivalent to Text function

    I have a db filed with numbers stored as strings. I need to convert them to 9 characters but some had their leading zeroes trimmed off at some point.

    So, 012345678 became 12345678.

    I would normally do Text(stringHere,"000000000") to convert this in Excel.

    Is there an equivalent function in Access?

    Thanks,

    Justin
    60% of the time it works every time.

  2. #2
    Board Regular
    Join Date
    May 2011
    Location
    Raleigh, NC
    Posts
    682
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: access equivalent to Text function

    Nevermind. It is just Format(string, format) like in VBA.
    60% of the time it works every time.

  3. #3
    MrExcel MVP
    Junior Admin
    Joe4's Avatar
    Join Date
    Aug 2002
    Posts
    49,462
    Post Thanks / Like
    Mentioned
    51 Post(s)
    Tagged
    11 Thread(s)

    Default Re: access equivalent to Text function

    Take a look at the FORMAT function.
    See: https://www.w3schools.com/sql/func_msaccess_format.asp

    The structure is identical to the Excel Text function.
    TIPS FOR FINDING EXCEL SOLUTIONS
    1. Use the built-in Help that comes with Excel/Access
    2. Use the Search functionality on this board
    3. A lot of VBA code can be acquired by using the Macro Recorder.

    "Give a man a fish, feed him for a day. Teach a man to fish, feed him for life!"

Some videos you may like

User Tag List

Tags for this Thread

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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