webstaff
01-15-2004, 06:27 AM
Hi Guys,
Can anyone advise me on this,
I want to change the fonts in a report via a command button on a form.
Section1 of the form(Detail section) has 60 RPTlabels names lbl1-lbl60
When i open the common dialog i want to pick a new style of font and get the report to reflect the change.
So far im not getting it, my code generated the Object doesnt support the properties.
My code is
<vb>
Private Sub Command6_Click()
' show font dialog
With CommonDialog1
.Flags = cdlCFScreenFonts
.ShowFont
End With
For Each RptLabel In DataReport1
With RptLabel.Font
.Bold = CommonDialog1.FontBold
.Italic = CommonDialog1.FontItalic
.Size = CommonDialog1.FontSize
.Name = CommonDialog1.FontName
End With
Next
DataReport1.Refresh
DataReport1.Show
End Sub
</vb>
Thanks in advance for any suggestions
W
Can anyone advise me on this,
I want to change the fonts in a report via a command button on a form.
Section1 of the form(Detail section) has 60 RPTlabels names lbl1-lbl60
When i open the common dialog i want to pick a new style of font and get the report to reflect the change.
So far im not getting it, my code generated the Object doesnt support the properties.
My code is
<vb>
Private Sub Command6_Click()
' show font dialog
With CommonDialog1
.Flags = cdlCFScreenFonts
.ShowFont
End With
For Each RptLabel In DataReport1
With RptLabel.Font
.Bold = CommonDialog1.FontBold
.Italic = CommonDialog1.FontItalic
.Size = CommonDialog1.FontSize
.Name = CommonDialog1.FontName
End With
Next
DataReport1.Refresh
DataReport1.Show
End Sub
</vb>
Thanks in advance for any suggestions
W