Refer to Subfrm in a TabControl

J

John

I have a Tab Control with two pages
On Each page I have the Same subform
Depending on wich page I select I would like to change the
backcolor of the subForms Detail & Header sections to
distinguish which page I am using.
How can I refer to the subforms Backcolor properties?

I have tried the follwoing with no results.
Page2 Onclick event
Me.subfMyObjects.Section(acDetail).BackColor = RGB(255, 0, 0)
 
V

Van T. Dinh

Provided that "subfMyObjects" in the name of the Subform
CONTROL, which can be different from the name of the Form
you use as the SourceObject, you can use:

Me.subfMyObjects.Form.Section(acDetail).BackColor = _
RGB(255, 0, 0)

HTH
Van T. Dinh
MVP (Access)
 
Top