See if this might work as a workaround:
Function padem(ByVal pStr As String, pchar As String, plen As Integer, pdir
As Boolean) As String
'*******************************************
'Purpose: Pad a string with user selected
' character
'coded by: raskew
'Inputs: x = "leftpad"; y = "rightpad"
'1) ? padem(x, "0", 10, False)
'2) ? padem(y, "-", 10, True)
'Output:
'1) 000leftpad
'2) rightpad--
'NOTE: pdir: true = left justify; false = right justify
'*******************************************
Dim strSql As String
Dim reps As Integer
Dim i As Integer
strSql = ""
'determine number padded of characters required
reps = plen - Len(pStr)
For i = 1 To reps
strSql = strSql & pchar
Next i
'place the padded string to the left or right
'based on the value of pDir
strSql = IIf(pdir = True, pStr & strSql, strSql & pStr)
padem = strSql
End Function
HTH -
Bob
Did a google on 'lPad'. It's an Oracle function.
Bob
lpad ('string', n [, 'string_pad')
rpad ('string', n [, 'string_pad')
[quoted text clipped - 8 lines]