Link to home
Start Free TrialLog in
Avatar of Petrobras
PetrobrasFlag for United States of America

asked on

Justify - Block Texting on Report

Hello,

I have read some posts about block texting and seems like you have to download a file from Lebans (http://www.lebans.com/justidirect.htm).  I did this and copied the code over.  

When I compile it hightlights ==> Dim Justi1 As New clsJustifyText

I added the references but it still gives me this error.  

the entire code is:
Option Compare Database
Option Explicit
Dim Justi1 As New clsJustifyText
Dim Justi2 As New clsJustifyText

Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
Call Justi1.fRecordSection(Me, Me.txt1, PrintCount)
Call Justi2.fRecordSection(Me, Me.txt2, PrintCount)
End Sub

Private Sub Report_Close()
Set Justi1 = Nothing
Set Justi2 = Nothing
End Sub

Private Sub Report_Open(Cancel As Integer)
DoCmd.Maximize
End Sub

Private Sub Report_Page()
Dim myBool As Boolean
myBool = Justi1.fJustiDirect(Me)
myBool = Justi2.fJustiDirect(Me)
Debug.Print "SF Page event"

End Sub


How can I solve the error?

thank you
ASKER CERTIFIED SOLUTION
Avatar of Rey Obrero (Capricorn1)
Rey Obrero (Capricorn1)
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Petrobras

ASKER

I did copy it but I had renamed it and that is why it did not work.  thought that maybe something was wrong so I imported it and kept the name as it then it worked!  One note was that I had to turn the font color to white or else the text on the report was hard to read.  
Capricorn,


I want to revisit this question.  I am block texting the paragraphs in my report.  The report code works however I have a report that has three subreports.  The reports work just fine alone but when I combine them to one report then the code does not work.  

Would you know what the problem is here?  Maybe you have experience with the code not working when you move the reports to a parent.  I tried copying the code over the parent report but did not work or maybe I did not do properly.  

thank you.
it could be the way you are referring to the subreport

Reports!NameOfReport!NameOfSubReportControl.Report.NameOfControlInTheSubreport