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

Need every other detail line to be bold font

Status
Not open for further replies.

newcoder54

Technical User
Jul 2, 2002
46
0
0
US
In my detail section, I need every other line to print in bold. Kind of green bar effect to make the report to be easier to read. I know that some code needs to be in the format section of the report that loops as it prints. Thanks - Larry
 
newcoder54,

If you put this code on the print event of the detail of your report


Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)

i = i + 1
If (i Mod 2) = 0 Then
Me.idbox.FontWeight = 800
Me.datebox.FontWeight = 800
Else
Me.idbox.FontWeight = 100
Me.datebox.FontWeight = 100
End If
End Sub


And this just above in the declarations


Option Compare Database
Public i As Integer


Every second line will print out bold.

Mordja
 
Thanks mordja - that worked perfect but now find out that reports that use code will not reflect those changes in my Word reports when I use the OutputTo funciton. Seems to be no way around that but think I will start a new thread for that. Again - thanks - Larry
 

newcoder54,

Why dont you try and put the above code in the format section instead of the print. I dont know if that will make a difference, as far as I understand the format event is for layout related criteria and the print for everything else. Im not sure what the above counts as.

Mordja
 
Tried that too - looks like you can't OutputTo and get the format that is controlled by code. Too bad!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top