B
Bob Quintal
Hello all. I am currently picking apart some code in a database to
revise it, and I am curious about something. The way the previous
person wrote the html code is odd to me, and was wondering if
there was a purpose of writing the code like this;
.HTMLBody = .HTMLBody & "<tr>" & "<td colspan=3>" & "<font face =
'arial' font size = 2 color = maroon>" & _
"<b>" & "Recommend/Repurchase" & "</b>" & "</td>" &
"</tr>" & "<tr>"
& "<td>" & "15" & "</td>" & "<td>"
No thats not the whole block of code but you get the idea. Vs
doing this;
.HTMLBody = .HTMLBody & "<tr><td colspan=3><font face = 'arial'
font size = 2 color = maroon><b>Recommend/Repurchase" & _
"</b></td></tr><tr><td>15</td><td>"
I've tested it both ways and they both work. I am just wondering
what purpose it would serve to have so many & signs
Putting the individual tags in quotes and concatenating will allow
future conversion to declared constants, He may have intended this
but never implemented.
Another possibility is coding in this form
..HTMLBody = .HTMLBody _
& "<tr>" _
& "<td colspan=3>" _
& "<font face = 'arial'font size = 2 color = maroon>" _
& "<b>" _
& "Recommend/Repurchase" _
& "</b>" _
& "</td>" _
& "</tr>" _
& "<tr>" _
& "<td>" _
& "15" _
& "</td>" _
& "<td>"
so that cutting and pasting is easy. Once thoroughly debugged, you
can take out the _ and line feeds.