• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 440
  • Last Modified:

Access: Change color of label on subform

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)?
0
ouestque
Asked:
ouestque
  • 4
1 Solution
 
mbizupCommented:
Tyr this:

Forms!MainFormName!subform2.Form.Label111.Backcolor = .......
0
 
mbizupCommented:
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)
0
 
mbizupCommented:
Here is a reference on how to refer to subforms, etc using VBA:
http://www.mvps.org/access/forms/frm0031.htm
0
 
ouestqueAuthor Commented:
Thanks MB That worked!!
0
 
mbizupCommented:
Glad to help :-)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now