Form Font making me Crazy

Samantha

still learning...
Local time
Today, 09:29
Joined
Jul 12, 2012
Messages
187
I am using the theme Newsprint in my database and the font keeps changing from Impact to Calibri on the one form and to Times New Roman on the other. When I switch each into design view the font reverts to Impact for the headers and switching to form view goes back to the alternate fonts :eek:. Is there a way to set the font for the headers using vba?
 
yup.

CtrlName.Font="Impact"

to change the fonts when the form opens try this:

Code:
Private Sub Form_Open()
Dim ctrl as Control
 
For each ctrl in Me.Controls
    if ctrl.ControlType= acLabel then ctrl.font="Impact"
Loop
 
End Sub
 
Thanks for your response CJ. If I am reading this correctly the code you supplied will change all labels on the form. How would I only change the header on the form, the name of the control I want to change is lblHeader? I would like the remaining labels on the form to stay set for Times Roman.
 

Users who are viewing this thread

Back
Top Bottom