Function PadL(lStr As String, lLength As Long, lPadChar As String) As String Dim lsPad As String, lsTmp As String Dim llen As Long If lLength < 0 Then PadL = "" Exit Function End If If lPadChar = "" Then lsPad = " " Else lsPad = lPadChar End If If Len(Trim(lStr)) >= lLength Then PadL = Left(lStr, lLength) Exit Function End If lsTmp = Trim(lStr) llen = Len(lsTmp) PadL = String(lLength - llen, lsPad) & lsTmp End FunctionThis was mirrored after the VFP function of the same name. You can pad a string up to any size and define the character to use to pad it with. If the padded size is less than the size of the string, then it truncates it.