Ask a Question related to Microsoft Access, Design and Development.
-
Allen Browne #1
Re: Changing label captions with VBA
If you make the changes in design view, and save the form, Access saves the
changes.
If you change them programatically and then close the form without using
design view, the changes are not saved.
If you change them programatically, switch to design view, make other
changes, switch back to form view, and then save them, the design changes
are saved.
BTW, Neal, I did a form like that several years ago. I used text boxes
instead of labels, and programatically set the date for each text box in
Form_Open. The Format property of the text boxes was just d, so they showed
just the day of the month. Under each text box was a subform: yes 35
instances of the same subform. The LinkMasterFields/LinkChildFields
properties used the date in the text box so that the right information
automatically appeared in the subforms for each date.
--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - [url]http://allenbrowne.com/tips.html[/url]
Reply to the newsgroup. (Email address has spurious "_SpamTrap")
"Neal Tipton" <tipton@gvtc.com> wrote in message
news:0TfVa.829$V_4.34708@eagle.america.net...month> I have an unbound form that is a one year calendar. The days for eachon> are made of 42 labels (6 rows of 7 plain boxes) with sequential names andfor> the form's open event, each label is made visible or invisible, and it's
> caption is changed to the day of the month. In addition, the 12 labelsyear.> the months have their captions changed to the appropriate month of theform_open> Here's the problem: I have noticed when I first started working with this
> form that whenever I closed the form and opened it in design mode the
> changes made to each label were gone and the original captions were
> reinstated. This was always the case until I started tweaking thenot> event to also read in special abbreviated notations for marked days from a
> table. Now it saves the altered version of the calendar and the caption
> changes can still be seen if you open the form in design mode. This isdoes> so much of a problem, really except that I don't know what the rule is.
> WHEN does Access make changes to labels made via VBA permanent and when> it not?
>
>
Allen Browne Guest
-
Changing Label Text in CFINPUT
Does anyone know how to change the label text in a CFINPUT statement. I have the style information set to a larger font and I want the label text to... -
Changing text on asp-label
Is it possible to change the text in a label from english to german like cultureinfo in Visual studio? regards reidarT -
Changing text of a label inside a control...
Hello there, I need to change the text of a label inside a datagrid. The label is part of an <EditItemTemplate > Can anyone post code of how... -
Changing the font and size for a button label
How do I change the font and size for a button label, textboxes etc. It seems easy to do in MS FrontPage but I'm have problems doing that in... -
Forms - multi-column sort, export label captions
Good day, I have 2 questions and hopefully someone can help me or give me some ideas. Firstly, I would like to be able to export data from a form... -
vanauden #2
Re: Changing label captions with VBA
To programatically (VBA) modify a form or report label in Access (I'm using 2010), you need to use .Caption
Me. (means the form you are in. You can also explicitely refer to the form using the following Forms!frm_Name!labelname)
Me.Label11.Caption = "new label text"
It is that easy.
Junior Member
- Join Date
- Feb 2011
- Location
- Canada
- Posts
- 1



Reply With Quote

