Results 1 to 2 of 2
  1. #1
    Lounger
    Join Date
    Feb 2001
    Location
    Upstate, New York, USA
    Posts
    47
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Field length on report (Access 2000, SR1a)

    I have a field on a report (CHECK_NUM) that *must* be 10 characters in length. The data in the field varies in size from 8 to 10 characters; if it's smaller than 10 characters, I have to insert leading zeroes; if it's 10 characters, leave it alone.

    Can anyone help me with the formula to automatically insert the leading zeroes when necessary?

    Thanks in advance.

    Kyle

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Field length on report (Access 2000, SR1a)

    Is the field numeric? If so, set the Format property of the text box to "0000000000" (10 zeros)

    If it is a text field, you can use one of the following expressions as Control Source:

    =Right("00" & [Check_Num],10)

    or

    =String(10-Len([Check_Num],"0") & [Check_Num])

Posting Permissions

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