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

Updating the font in a Report through a Form!!!!

Status
Not open for further replies.

Kckronic21

Programmer
Jul 29, 2001
81
US
Hi, I was wondering if there was a way to update the font of a report through a form using combo boxes? Thanks!
 
You can use this...
Note- Pass in the name of the report as strReport and the name of the new font as strFontName. Let me know if you need more help with it.

Sub ChangeReportFont(strReport As String, strFontName As String)

On Error Resume Next

Dim conControl As Control

DoCmd.OpenReport strReport, acViewDesign

For Each conControl In Reports(strReport).Controls
conControl.Properties("FontName") = strFontName
Next conControl

DoCmd.Save acReport, strReport
DoCmd.OpenReport strReport, acViewNormal

End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top