Keep indents user has typed and recorded in Database in in email body

Sandra Smith
Sandra Smith used Ask the Experts™
on
I have a jprocess that creates an email from user input into an ACCESS database.  It works find except teh user may indent items in the text box on the form.  say they input:

Todays Project
    - Keep going

Is there a way when the record is returned from the select statement to keep this indentation?  There woudl be severa layers and they want it to appear like this in the email.  This is not spacing that is controlled in the email code, but spacing that is recorded in the table in ACCESS itself.  Hope that made sense.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Francis OmorutoInfrastructure and Database Design Consultant

Commented:
If it's an HTML email body, you can just suround the text with <pre>...</pre> to keep the formatting.
Sandra SmithRetired

Author

Commented:
Yes, it is HTML and thank you.  I will test and get back.
Sandra SmithRetired

Author

Commented:
Actually, below is a sample, where would I put this code?
        strMailBody = strMailBody & "<br /><Font Color=Black>" & "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-" & ![Update] & "</Font>"
Announcing the Winners!

The results are in for the 15th Annual Expert Awards! Congratulations to the winners, and thank you to everyone who participated in the nominations. We are so grateful for the valuable contributions experts make on a daily basis. Click to read more about this year’s recipients!

I agree. The email message format is key.  I think with rtf a simple set value.  HTML has been commented. Plain text will not work. If you use a memo field in the database, it can be set to rich text to preserve the formatting of the user.
Francis OmorutoInfrastructure and Database Design Consultant
Commented:
I agree with the last comment.
The way you store the data also matters.

To answer your previous question:

strMailBody = strMailBody & "<br /><Font Color=Black><pre>" & "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-" & ![Update] & "</pre></Font>"
 
Top Expert 2007

Commented:
>>If you use a memo field in the database, it can be set to rich text to preserve the formatting of the user.

Be aware that memo fields come with their own headaches:

http://allenbrowne.com/ser-63.html
http://objectmix.com/ado-dao-rdo-rds/50498-using-getchunk-read-memo-field-access-database-crashes-windows-xp.html
Sandra SmithRetired

Author

Commented:
This is an ACCESS 2003 database and I am trying to figure out how to set to rtf.  That choice does not appear in the format property.
Sandra SmithRetired

Author

Commented:
While I think ACCESS 2003 cannot be done, I did find that for other clients with 2010, this did seem to work.  Thank you.
rtf format for memo fields was introduced in 2007 and continues in 2010.
The option was not available in 2003 and earlier versions.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial