Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Aligning/Justifying text in report

Status
Not open for further replies.

barit

Technical User
Jun 29, 2004
38
CA
I have a mailing label report that opens after the user determines certain critieria to include on the mailing label. In addition to selecting the information they want to see on the label, I would also like to provide the user with several formatting options that they can choose. For example
- Centre text
- Left Justify text

Is there code that I can include as part of an option group that would furnish the end user with this formatting tool.

Thanks in advance for any help. Its greatly appreciated.
 
You would need code in the On Format event of the detail section ie:
Code:
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
    Dim ctrl As Control
    'must have the form open 
    If Forms!frmMyForm!chkCenterText = True Then
        For Each ctrl In Me.Controls
          ctrl.TextAlign = 2
        Next
    End If
End Sub

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
Thanks so much for your help. It works great.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top