Controlling Subform Text Box Colors from the Parent Form

  • Thread starter Thread starter Don
  • Start date Start date
D

Don

(Originally posted to microsoft.public.office.access.forms, but
redirecting the discussion here)

Is it possible to control the background color of a text box on a
subform from the parent form? If so, would someone kindly throw me a
bone as I have not been able to figure it out.

Thanks!

Don
 
Hi Don,
if the subform is continuous view, you can try using conditional formatting
in the subform - don't know what you are trying to do so this may not work.

If it is single view, you can use syntax like this
Me.[SubformControlName].Form.[ControlName].BackColor = lngMyColor

Note:
Replace the obvious with the names of your objects and variables.
SubformControlName is the name of the control on the main form that holds
the subform and may be different from the name of the subform inside that
control.
You will need to set the value of lngMyColor to whatever color you need.


If you use the above syntax for a continuous subform, every row will be
affected by the color change.

Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia
 
(Originally posted to microsoft.public.office.access.forms, but
redirecting the discussion here)

Is it possible to control the background color of a text box on a
subform from the parent form?  If so, would someone kindly throw me a
bone as I have not been able to figure it out.

Thanks!

Don

This might be helpful...
http://www.mvps.org/access/forms/frm0031.htm
"Refer to Form and Subform properties and controls"
 
Hi Don,
if the subform is continuous view, you can try using conditional formatting
in the subform - don't know what you are trying to do so this may not work.

If it is single view, you can use syntax like this
Me.[SubformControlName].Form.[ControlName].BackColor = lngMyColor

Note:
Replace the obvious with the names of your objects and variables.
SubformControlName is the name of the control on the main form that holds
the subform and may be different from the name of the subform inside that
control.
You will need to set the value of lngMyColor to whatever color you need.

If you use the above syntax for a continuous subform, every row will be
affected by the color change.

Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia




(Originally posted to microsoft.public.office.access.forms, but
redirecting the discussion here)
Is it possible to control the background color of a text box on a
subform from the parent form?  If so, would someone kindly throw me a
bone as I have not been able to figure it out.

Don- Hide quoted text -

- Show quoted text -

Jeanette,

Exactly what I needed!

Thanks!

Don
 
Back
Top