Results 1 to 5 of 5
  1. #1
    Gina Maylone is offline Always learning
    Windows 10 Access 2016
    Join Date
    Jun 2013
    Location
    Afton, MN
    Posts
    544

    HTML is this possible?

    Good morning!



    Can I do this?
    Code:
     & " making your assessment account "<font color=red>" & "60 days delinquent."&"</font>" &
    Or should I quit trying? The whole thing:

    Code:
    ="Our records indicate that your assessment account is now past due in the amount of $" & Format([bal],"#,###.00") & " through " & Format(DateAdd("d",10,[Forms]![runassessments]![lfdate]),"mmmm") & " " & Format(DateAdd("d",10,[Forms]![runassessments]![lfDate]),"yyyy") & " making your assessment account "<font color=red>" & "60 days delinquent."&"</font>" & " Please remit payment in the amount of $" & Format([bal],"#,###.00") & " or contact me no later than 4:30 p.m. on " & Format(DateSerial(Year(Date()),1+Month(Date()),1)," mmmm d"", ""yyyy") & " to set up the suggested Payment Plan, which is enclosed with this letter."
    Text box is set to Rich Text, I want the "
    60 days delinquent" in red. I've successfully done it with one word in a separate control and can do bold and underline. But client really wants RED.

    Access 2016. I get Invalid Syntax error. This works without error:

    Code:
    ="Our records indicate that your assessment account is now past due in the amount of $" & Format([bal],"#,###.00") & " through " & Format(DateAdd("d",10,[Forms]![runassessments]![lfdate]),"mmmm") & " " & Format(DateAdd("d",10,[Forms]![runassessments]![lfDate]),"yyyy") & " making your assessment account 60 days delinquent.  Please remit payment in the amount of $" & Format([bal],"#,###.00") & " or contact me no later than 4:30 p.m. on " & DateSerial(Year(Date()),Month(Date())+1,0) & " to set up the suggested Payment Plan, which is enclosed with this letter."
    I thank you in advance :-) ~PEACE~

  2. #2
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,979
    You can format different parts of a text string where its in a memo field. For example:

    Click image for larger version. 

Name:	RichText.PNG 
Views:	13 
Size:	42.3 KB 
ID:	36217
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

  3. #3
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    And in your usage, you need the html tags within the quotes, not outside them. Form references and such that need to be evaluated go outside.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  4. #4
    Gina Maylone is offline Always learning
    Windows 10 Access 2016
    Join Date
    Jun 2013
    Location
    Afton, MN
    Posts
    544
    I got it! YAY! Thank you all! Had to mess with those quotes a bit Paul, but this was the end result:
    Code:
    ="Our records indicate that your assessment account isnow past due in the amount of $" & Format([bal],"#,###.00")& " through " &Format(DateAdd("d",10,[Forms]![runassessments]![lfdate]),"mmmm")& " " &Format(DateAdd("d",10,[Forms]![runassessments]![lfDate]),"yyyy")& " making your assessment account <font color = red>60 daysdelinquent.</font> Please remit payment in the amount of $" &Format([bal],"#,###.00") & " or contact me no later than4:30 p.m. on " &Format(DateSerial(Year(Date()),1+Month(Date()),1)," mmmm d"",""yyyy") & " to set up the suggested Payment Plan,which is enclosed with this letter."

  5. #5
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Glad you got it working! The quotes do seem complicated, but one day it will all fall into place.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Export to HTML
    By Thompyt in forum Programming
    Replies: 5
    Last Post: 03-03-2017, 10:48 AM
  2. Html <tr> that must go away!
    By lonesoac0 in forum Macros
    Replies: 19
    Last Post: 09-15-2016, 11:28 AM
  3. How to use html tag <a>?
    By Corey in forum Modules
    Replies: 2
    Last Post: 08-10-2015, 02:17 PM
  4. HTML and VBA
    By tylerg11 in forum Forms
    Replies: 1
    Last Post: 08-23-2012, 05:53 PM
  5. ODBC Html
    By trenta7 in forum Import/Export Data
    Replies: 1
    Last Post: 02-08-2011, 08:55 AM

Tags for this Thread

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