Code to to change labels formats

K

kw_uh97

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.
 
G

Guest

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.
 
F

fredg

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.
 
J

John Vinson

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]
 
K

kw_uh97

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
 
Top