Connecting Tech Pros Worldwide Help | Site Map

VBA code to change the label text

  #1  
Old March 12th, 2006, 08:25 PM
Simon
Guest
 
Posts: n/a
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


  #2  
Old March 12th, 2006, 09:05 PM
salad
Guest
 
Posts: n/a

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"
  #3  
Old March 12th, 2006, 11:35 PM
Bob Quintal
Guest
 
Posts: n/a

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Access-VBA] How to create form which record source are FEW (not only one) tables? chrismaliszewski answers 7 September 28th, 2009 08:02 PM
Display Pictures in Access Report through VBA code smorrison64 answers 2 December 6th, 2007 06:45 PM
Switchboard button put button-text behind AA Arens answers 1 October 9th, 2006 09:45 PM
how to forbid an apostrophe in text box (input mask?) Richard Hollenbeck answers 13 November 13th, 2005 04:30 AM