Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Crlf from Access to Word FormFields

Status
Not open for further replies.

ECCOGuy

IS-IT--Management
Aug 31, 2006
33
US
I'm trying to fill out a form in Word from information in Access. It all seems to be working well, except I'm getting the blasted little square character when I put in a vbCrlf...

.FormFields("Text24").Result = Nz(rst("Address") & vbCrLf & rst("City") & ", " & rst("State") & " " & rst("ZIP"))

The provider of the form only placed one field for the entire address, but I want it to look normal. What I get is:

1234 Anystreet??Spudville, ID 12345

I've Googled around and haven't found anything helpful.

What am I doing wrong?

Spencer
MCSE2k, MCSA2k, Net+, A+
 
Try to replace vbCrLf by either vbCr or vbLf.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Just the vbCr by itself seems to work! I don't know why I didn't try that myself first. Thanks for the help!!!

Spencer
MCSE2k, MCSA2k, Net+, A+
 
I take that back, it worked on one field, but not the other three!?! I don't understand, unless the designer of the original form screwed it up for me somehow?

Spencer
MCSE2k, MCSA2k, Net+, A+
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top