Look at the source code behind the sample Reports, for example the
report named "rptClass JustifyText".
' ********START CODE
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.txtTestmemo, PrintCount)
Call Justi2.fRecordSection(Me, Me.txtTestMemo2, 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
' ********END CODE
You need to duplicate this code behind your own report. Make sure you go
through the user interface and select "Event Procedure" behind the
Detail section's PRINT event and the report's PAGE event.
This sample report has two TextBox controls that is justifies Text in,
named txtTestMemo and txtTestMemo2. Look at the properties for each
TextBox control.
The Font color is set to WHITE.
The ControlSource is set to the memo field named testmemo.
An alternative to all of this is to use my JustifyText ActiveX control.
The only drawback is that it does not support CanGrow/Shrink as the
JustiDirect solution does.
http://www.lebans.com/xjustifytext.htm
--
HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
"Mark Thomas" <m.********@ntlworld.com> wrote in message
news:2f**************************@posting.google.c om...
Delighted to find Lebans textbox justification but...
...after you have downloaded the sample database, with its module,
what do you do to make your own text boxes in your own database have
justified text?
I have tried copying the module out of the sample database but that,
in itself, didn't do the trick.