line breaks

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.
 
F

Fredg

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.
 
G

Guest

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.


.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top