Field Format

JPR

Registered User.
Local time
Today, 05:25
Joined
Jan 23, 2009
Messages
204
Hello,

I use the following VBA to copy a record from a textbox (FILENO) to the body of an email (EMAILTOCLIENT).

Me.EMAILTOCLIENT = "Hello ," & vbCrLf & vbCrLf & "this is your file number: " & " - " & [FILENO] & " "

I would like to give the file number a SSN format (000-00-0000).

I have this code I use to export to word but cannot make it work.

" Left([FILENO], 3) & "-" & Mid([FILENO], 4, 2) & "-" & Right([FILENO], 4)"

Thank you for any help.
 
Just use that format as your Format string.
 
If you really have quotes around the whole thing, that's your problem. Try

Me.EMAILTOCLIENT = "Hello ," & vbCrLf & vbCrLf & "this is your file number: " & " - " & Left([FILENO], 3) & "-" & Mid([FILENO], 4, 2) & "-" & Right([FILENO], 4) & " "
 

Users who are viewing this thread

Back
Top Bottom