I have a custom function (which I found on-line somewhere) to accomplish that:
Code:
Function Pad(varText As Variant, strAlign As String, intLength As Integer, Optional strFill As String = " ") As String
If Len(varText) >= intLength Then
'if the source string is longer than the specified length, return the Length left characters
Pad = Left(varText, intLength)
ElseIf strAlign = "L" Then
'text aligns left, fill out the right with specified character
Pad = varText & String(intLength - Len(varText), strFill)
Else
'text aligns right, fill out the left with specified character
Pad = String(intLength - Len(varText), strFill) & varText
End If
End Function
Or you can just do this in query or textbox:
[title] & String(40 - Len([title]), ".")