Results 1 to 4 of 4
  1. #1
    Join Date
    Apr 2004
    Posts
    2

    Unanswered: update text field

    Sorry, I'm pretty newbie. I have a numeric field that needs to update to a new table. In the new table the field has to be text and zero filled. I tried everything on mask but didn't work. Can someone help?

  2. #2
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    Why do you have to do that?

    Could you not change the target table's datatype to number and apply display masks when necessary?

  3. #3
    Join Date
    Apr 2004
    Posts
    2
    I need a 7 byte only output and the data needs to export as '0000123'

  4. #4
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    You CAN parse your number into a string yes, I understand your question.

    but why?

    That doesn't seem like a logistically sound thing to do..?

    I don't know why you would do this, but here's a crude function you could use:
    Code:
    Public Function IntToStr(IntValue As String) As String
    Dim s As String
    Dim i As Integer
    
    For i = 1 To (7 - Len(IntValue))
        s = s & "0"
    Next i
    s = s & IntValue
    IntToStr = s
    
    End Function
    Last edited by Teddy; 04-22-04 at 17:34.

Posting Permissions

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