Results 1 to 8 of 8
  1. #1
    Gina Maylone is offline Always learning
    Windows 7 64bit Access 2013
    Join Date
    Jun 2013
    Location
    Afton, MN
    Posts
    544

    Why do HTML characters show up in my RTF field?

    Hello!

    I have a field "ServiceInstructionsRTF" it is a Long Text field and set to Rich Text in the table. It is set to Rich Text in the form it is on, and is Rich Text in the report it is on. If a user inadvertently types 2 or more spaces in the field, it shows "   &nbsp". I've tried using Replace to eliminate extra spaces, I've triple checked all of the field types. I don't know how to get rid of these characters!



    Advice?

    TIA!
    Attached Thumbnails Attached Thumbnails rtfissue.JPG  

  2. #2
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 8 Access 2013
    Join Date
    Aug 2013
    Posts
    7,862
    Are they typing or are they pasting? I can't remember all of the settings. What happens if you bind the form to the table and drag the Long Text field onto the form? Does the control default to RTF or did you change things up? I usually use RTF when I want to code in some formatting. So the table stores the code and the control displays the desired format.

  3. #3
    Gina Maylone is offline Always learning
    Windows 7 64bit Access 2013
    Join Date
    Jun 2013
    Location
    Afton, MN
    Posts
    544
    Quote Originally Posted by ItsMe View Post
    Are they typing or are they pasting? I can't remember all of the settings. What happens if you bind the form to the table and drag the Long Text field onto the form? Does the control default to RTF or did you change things up? I usually use RTF when I want to code in some formatting. So the table stores the code and the control displays the desired format.
    Typing....yes default to rtf. They need the ability to highlight/bold/underline etc. in this particular field. Thanks!

  4. #4
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 8 Access 2013
    Join Date
    Aug 2013
    Posts
    7,862
    I would remove the formatting in the table. Use the formatting in the control as RTF to allow your users to use intrinsic tools and type their stuff into the control. This way the table does its job of storing the tags and Access does its job of creating them.

  5. #5
    Gina Maylone is offline Always learning
    Windows 7 64bit Access 2013
    Join Date
    Jun 2013
    Location
    Afton, MN
    Posts
    544
    Hi ItsMe,

    I changed the field in the table to Plain Text and left the control in the form Rich Text (I didn't know I could do that), but the &NBSP still shows in the report. HOWEVER while messing around with this, I previously had:
    Code:
    =Format([serviceINSTRUCTIONSrtf],">")
    in the control source, I removed it and the characters disappeared! So I guess they'll have to decide what is more important, capital letters or no HTML char's. Thank you for your time!!

  6. #6
    Gina Maylone is offline Always learning
    Windows 7 64bit Access 2013
    Join Date
    Jun 2013
    Location
    Afton, MN
    Posts
    544

    Solved it

    I just put
    Code:
    =UCase([ServiceInstructionsRTF])
    in the control source of the report, now all caps and no html tags!

  7. #7
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 8 Access 2013
    Join Date
    Aug 2013
    Posts
    7,862
    If they want capitol letters, you can store capital letters in your table. Here is a code snippet ...
    Code:
    Dim strSample As String
    strSample = Me.txtSample.Value
    Me.txtSample.Value = StrConv(strSample, vbProperCase)

  8. #8
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 8 Access 2013
    Join Date
    Aug 2013
    Posts
    7,862
    Actually, formatting might be better in this case, since you have HTML tags in your table.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. HTML characters in plain text field
    By etorasso in forum Access
    Replies: 3
    Last Post: 09-25-2014, 11:47 AM
  2. New line in html email form field
    By srk999 in forum Forms
    Replies: 3
    Last Post: 02-18-2014, 06:34 PM
  3. Replies: 9
    Last Post: 02-11-2013, 03:09 PM
  4. SendObject - HTML tags in 'To' field
    By Hello World in forum Forms
    Replies: 1
    Last Post: 10-20-2011, 02:31 PM
  5. HTML tags in memo field
    By sprovoyeur in forum Access
    Replies: 0
    Last Post: 05-11-2010, 01:33 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums