Access: Change color of label on subform

Posted on 2007-10-17
Medium Priority
Last Modified: 2013-11-27
What Access vbcode could I write to change the color of a label(Label111) on a subform(Name: subform2 Object Source: Sub_form2) on my form(Form1)?
Question by:ouestque
  • 4
LVL 61

Expert Comment

ID: 20095545
Tyr this:

Forms!MainFormName!subform2.Form.Label111.Backcolor = .......
LVL 61

Accepted Solution

mbizup earned 2000 total points
ID: 20095558
Using your actual form name:

Forms!Form1!subform2.Form.Label111.Backcolor = .......

(you may want to consider changing to more descript names before your project grows much more)
LVL 61

Expert Comment

ID: 20095569
Here is a reference on how to refer to subforms, etc using VBA:

Author Comment

ID: 20096342
Thanks MB That worked!!
LVL 61

Expert Comment

ID: 20096358
Glad to help :-)

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Microsoft Access has a limit of 255 columns in a single table; SQL Server allows tables with over 255 columns, but reading that data is not necessarily simple.  The final solution for this task involved creating a custom text parser and then reading…
Sometimes MS breaks things just for fun... In Access 2003, only the maximum allowable SQL string length could cause problems as you built a recordset. Now, when using string data in a WHERE clause, the 'identifier' maximum is 128 characters. So, …
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
Suggested Courses

807 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question