line breaks

  • Thread starter Thread starter Jim
  • Start date Start date
J

Jim

Does anyone know how to make line breaks in a text box
between a simple series of DLookups? "vbCrLf" is not
working and "Chr(13) & Chr (10)" is also not working.
Thank you.
 
Jim,
Chr(13) & chr(10) should work if you have written the expression correctly.

= DLookUp("[SomeField]","SomeTable") & chr(13) & chr(10) &
DLookUp("[AnotherField]","AnotherTable")

Make sure the control is high enough (or set to CanGrow) to display all the
lines.

The VB Constants (vbCrLf) will only work if you are writing code in a VBA
code window.
 
Fred,

Thank you for your courteous response. Chr(13) & Chr(10)
are working correctly now.

I have also learned how to run all the looked-up fields
together following a single DLookUp (the same table is
used for all), in order to make it run more efficiently,
by putting all the fetched fields and line breaks
together in the expression part of the DLookUp. I'm not
using any criteria.

Thanks again.
-----Original Message-----
Jim,
Chr(13) & chr(10) should work if you have written the expression correctly.

= DLookUp("[SomeField]","SomeTable") & chr(13) & chr(10) &
DLookUp("[AnotherField]","AnotherTable")

Make sure the control is high enough (or set to CanGrow) to display all the
lines.

The VB Constants (vbCrLf) will only work if you are writing code in a VBA
code window.
--
Fred

Please reply only to this newsgroup.
I do not reply to personal e-mail.


Jim said:
Does anyone know how to make line breaks in a text box
between a simple series of DLookups? "vbCrLf" is not
working and "Chr(13) & Chr (10)" is also not working.
Thank you.


.
 
Back
Top