mobile databases, mobile forms, and mobile synchronization … where you need to work
Providing Pocket Access, Mobile Database, Windows CE Database, and Windows CE Development Solutions

Tip of the Month (January 2005)

Creating a Character String With an Embedded Line-Feed

You may want to write an expression that produces multiple lines of text. For example, if you had a NAME, ADDRESS, CITY, and STATE field in your table, you may want to generate a formatted address. No doubt you will want to get a line-feed into the text to format it correctly.

Here's the expression you can use to do this:
NAME & @char(13) & @char(10) & ADDRESS & @char(13) & @char(10) & CITY & ' '& STATE

If NAME is 'John Smith', ADDRESS is '!23 Main Street', CITY is 'Anytown', and STATE is 'MA", the resulting string would look like this:

John Smith
123 Main Street
Anytown MA

Note: If you use this expression in a calculated control, make sure the control is high enough to show all the lines and make sure the format of the control is set to "Text".