I have set up a report in 2007 with the rich text format tool on board in Access. I have this working after working out that it is a hybrid with HTML to manipulate the formating.
This works ok except for one annoying feature. When I extend the text box across more than one page I am loosing the bold heading and the first three or four words of the next sentence. I am not sufficently familar with HTML to know if this is a bug in Access or incorrect coding on my part.
The specific code that is responsible for this piece of the report is:
If .chkExclusion Then
Set rst = New ADODB.Recordset
mstrReport = mstrReport & "<BR><BR><B>Exclusions</B><BR><BR>The following items are excluded:<UL>"
strSQL = "SELECT qryJobScopeDetail.ExclusionShortDesc, qryJobScopeDetail.ExclusionDescription " & _
"FROM qryJobScopeDetail " & _
"UNION " & _
"SELECT qryStdExclusion.ExclusionID, qryStdExclusion.ExclusionDescription " & _
.Open strSQL, CurrentProject.Connection, adOpenKeyset, adLockPessimistic
Do Until .EOF
If Len(.Fields("ExclusionDescription")) > 0 Or Not IsNull(.Fields("ExclusionDescription")) Then
mstrReport = mstrReport & "<LI TYPE=CIRCLE>" & .Fields("ExclusionDescription")
I am not sure whether I can add more line breaks to fix this, although I suspect the line breaks are being ignored. I can't add a page break and the code continues to add more data to mstrReport until the entire report is contained in it and then prints to the text box. I have used this technique before without this issue although previously I have not spanned a page.
Last edited by gvee; 09-21-07 at 07:02.
Reason: from <code> to [CODE]