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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

This should be an EASY one for the Experts Continued

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
0
0
In Access 97 SR-2, my function calls & LF to generate a break in the line but on the report that calls the function there is no break. Earlier today, a kind expert told me to replace the LF with CHR(13) or CHR(10). This caused a character (a tall square) to appear where I wanted the line to break but did not break the line.

Are there any other kind helpers out there with another suggestion??

Sincerely,

Trying to avoid calling in a high priced consultant in Santa Rosa
 
I said Chr(13) AND Chr(10), the reason I placed the &'s was so that you wouldn't get the strange boxes..

HTH Joe Miller
joe.miller@flotech.net
 
And again, vbCrLf does it w/ less confusion
MichaelRed
mred@att.net

There is never time to do it right but there is always time to do it over
 
Michael,

vbCrLf works fine in code, but if you try and place it in a text box or in a query it won't work. This was my motivation for explaining using Chr().

Joe Miller
joe.miller@flotech.net
 
Joe,

mea culpa. Youa culpa.

You are correct about the vbcrlf not working in the text box. It appears that the Chr(10) & Chr(13) do not do it either.

MichaelRed
mred@att.net

There is never time to do it right but there is always time to do it over
 
vbcrlf should work in a REPORT through a function, however on a form you will have to set the textbox's [Enter Key Behavior] to [new line in field]
 
Michael:

It's working in the textbox I just tested it in... Joe Miller
joe.miller@flotech.net
 
I don't know if it works on a text box, but the only thing I ever use in code is "vbNewLine". Seems to be a bit better for readibility. Personal preference, and one more option. Jim Lunde
compugeeks@hotmail.com
Custom Application Development
 
Nice Jim, that's a new one for me, never heard of that. It won't work in a text box though. No VB constant will because Access thinks that it's a fieldname/parameter and puts the []'s around it so it won't work because it has to be passed to the engine without the brackets.

Joe Joe Miller
joe.miller@flotech.net
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top