Concatenating strings

F

Frank Reichenbacher

Back in the days when I didn't know what a "Memo" field was for I set up
four text boxes on a form for users to add notes. Now I need to concatenate
the data in the four fields and display it in a single memo field.

My problem is that I would really like to separate each of the four combined
strings by a carriage return, otherwise the information will be a little
hard to read. Anyone know how to do that? I experimented with some
solutions, but they didn't even come close to working and they aren't even
worth describing.

Frank
 
F

fredg

Back in the days when I didn't know what a "Memo" field was for I set up
four text boxes on a form for users to add notes. Now I need to concatenate
the data in the four fields and display it in a single memo field.

My problem is that I would really like to separate each of the four combined
strings by a carriage return, otherwise the information will be a little
hard to read. Anyone know how to do that? I experimented with some
solutions, but they didn't even come close to working and they aren't even
worth describing.

Frank

In Access you need a carriage return AND a line feed (in that order).

Run an update query to populate the memo field.
Update YourTable Set YourTable.MemoField = [FieldA] & chr(13) &
chr(10) & [FieldB] & chr(13) & chr(10) & [FieldC] & chr(13) & chr(10)
& [FieldD];
 

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