Results 1 to 3 of 3
  1. #1
    2 Star Lounger
    Join Date
    May 2001
    Location
    Maryland, USA
    Posts
    105
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Convert Numeric to Text (2000)

    Is there a function that I can use to convert a numeric field to text? I'm trying to add the results of an autonumber field to a three-letter prefix but I lose the leading zeros I get by formatting the autonumber with "0000."

    Thanks,
    Eric

  2. #2
    3 Star Lounger
    Join Date
    May 2002
    Location
    Toronto, Ontario, Canada
    Posts
    314
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Convert Numeric to Text (2000)

    You can use CStr() which will convert the number to a string value....
    To concatenate the three letter prefix you'd need to do something like:
    StringFieldName = "xyz" & CStr(NumericFieldName)

    HTH

    Wait... If you're formatting the Autonumber field... do this...
    StringFieldName = "xyz" & Format(CStr(NumericFieldName), "0000")
    I haven't tested this, but I think that'll work... <img src=/S/smile.gif border=0 alt=smile width=15 height=15>

  3. #3
    2 Star Lounger
    Join Date
    May 2001
    Location
    Maryland, USA
    Posts
    105
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Convert Numeric to Text (2000)

    That did it!

    Thanks,
    Eric

Posting Permissions

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