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 sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Textbox in a Report

Status
Not open for further replies.

SheepDog

Programmer
Feb 4, 2003
232
US
I have a text box in a report that has data and want to have a few words in the text box in bold format. How can I do this without making the whole textbox bold?
 
You would need a Rich Text control. You can also use the Print method of the report as follows:
Code:
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
    Dim lngY As Long
    lngY = 500
    CurrentX = 2000
    Me.FontSize = 20
    Me.FontName = "Arial"
    Me.FontBold = True
    Me.ForeColor = vbBlue
    CurrentY = lngY
    Me.Print "Hello "
    Me.FontBold = True
    Me.ForeColor = vbGreen
    CurrentY = lngY
    Me.Print "There "
    Me.FontBold = False
    CurrentY = lngY
    Me.ForeColor = vbRed
    Me.Print "Buddy"
End Sub

Duane
MS Access MVP
Find out how to get great answers faq219-2884.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top