Connecting Tech Pros Worldwide Help | Site Map

VBA code to change the label text

Simon
Guest
 
Posts: n/a
#1: Mar 12 '06
Dear reader,



Is it possible to change the text of a label in a form on the event "By
open".

In the event some VBA code will change the label text.



If I specify: Me.name_Label = "new title"



I receive the massage "Object doesn't support this property or method."



Thanks for any help.

Kind regards,

Simon van Beek


salad
Guest
 
Posts: n/a
#2: Mar 12 '06

re: VBA code to change the label text


Simon wrote:
[color=blue]
> Dear reader,
>
>
>
> Is it possible to change the text of a label in a form on the event "By
> open".
>
> In the event some VBA code will change the label text.
>
>
>
> If I specify: Me.name_Label = "new title"
>
>
>
> I receive the massage "Object doesn't support this property or method."
>
>
>
> Thanks for any help.
>
> Kind regards,
>
> Simon van Beek
>
>[/color]
Me.LabelName.Caption = "New Title"
Bob Quintal
Guest
 
Posts: n/a
#3: Mar 12 '06

re: VBA code to change the label text


"Simon" <S.v.Beek@HCCnet.nl> wrote in
news:44147fd2$0$18780$e4fe514c@dreader12.news.xs4a ll.nl:
[color=blue]
> Dear reader,
>
>
>
> Is it possible to change the text of a label in a form on the
> event "By
> open".
>
> In the event some VBA code will change the label text.
>
>
>
> If I specify: Me.name_Label = "new title"
>
>
>
> I receive the massage "Object doesn't support this property or
> method."
>
>
>
> Thanks for any help.
>
> Kind regards,
>
> Simon van Beek
>[/color]
You need to address the label's .caption property.
Me.name_Label.caption = "new title"



--
Bob Quintal

PA is y I've altered my email address.
Closed Thread