Memo field carriage return...

A

Al Borges

Hi there:

I have a function that takes various text field data, adds them together and
dumps the output into a memo field. The problem that I have is that I'd like
to add line spaces to the data dumped into the memofield. Right now, the
data would look like this:

"Mrs. Doe is a 62 year old white female with h/o HTN, h/o Chest Pain PMH:
Medical- Patient denies any significant chronic medical illnesses. Surgical-
Patient denies any significant past surgical history. Medications-
Allergies- None known. SH: Unknown at this time. Patient denies h/o smoking,
heavy drinking, or drug abuse. FH: Unremarkable."

What I'd like is for the data inside the memo field to look like this:

"Mrs. Doe is a 62 year old white female with h/o HTN, h/o Chest Pain

PMH:
Medical- Patient denies any significant chronic medical illnesses.
Surgical- Patient denies any significant past surgical history.
Medications-
Allergies- None known.

SH: Unknown at this time. Patient denies h/o smoking, heavy drinking, or
drug abuse.

FH: Unremarkable."

I've tried chr(13), but all I get is a textbox character. What should I do
to achieve this effect inside the memo field?

Thanks!

Regards,
Al
 
J

John Smith

Use vbCrLf, which is the same as Chr$(13) & Chr$(10). You need both characters
for a valid line end in Windows.
 
A

Al Borges

Hi John:

Just tried it out and it works great! Thanks so much... I've been stuck on
this for months!

Warm Regards,
Al
 
Top