Code to to change labels formats

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello Everyone

I would like to manipulate the font of all my labels on a form and report by
code for efficiency.

Thanks In Advance.
 
hi,
this is just a reset property thing. real simple

me.label1.fontsize = 10

other label properties you can change.
fontbold
fontitalic
fontname
fontunderline
fontweight
fontcolor
hope it helped.
 
Hello Everyone

I would like to manipulate the font of all my labels on a form and report by
code for efficiency.

Thanks In Advance.

Would you also like to be a bit more forthcoming and be a bit more
specific as to what you wish to do.
 
Hello Everyone

I would like to manipulate the font of all my labels on a form and report by
code for efficiency.

Thanks In Advance.

Try something like:

Dim ctl As Control
For Each ctl In Me.Controls
If ctl.ControlType = acLabel Then
ctl.FontSize = 12
End If
Next ctl

John W. Vinson[MVP]
 
Thanks John, Fredg and anonymous

I was trying to avoid setting each individual control's properties and the
code that John provided did the trick.

Ken
 
Back
Top