change the backcolor of a subform details section

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I try to change the backcolor of a subForm details section ,hesder and footer
from the main Form.

I tried this but recieved an error:

"F_problem_open_subform" name of the sub form.

Me.F_problem_open_subform.Form.Detail.BackColor =
[Forms]![F_ColorSetting]![DetailsBackColor]

Me.F_problem_open_subform.Form!FormHeader.BackColor =
[Forms]![F_ColorSetting]![HeaderFormBackColor]

Me.F_problem_open_subform.Form!FormFooter.BackColor =
[Forms]![F_ColorSetting]![TitleBackColor]
 
Hi Liora,
The sintax you use seems me correct.
Are you sure of the names of the forms?
Which is the error raised?
 
×©×œ×•× ×œ×™×ורה

1. What is the error?
2. Is the form F_ColorSetting open when you run the code
3. F_problem_open_subform - need to be the name of the sub form control name
within the main form
4. What are you trying to do?
 
The error:
"can't find the field 'FormHeader' referred to in your expression"

The "Detail" section is OK now!!

The lines are:
-------------------------------------------------------------------------------------------
Me.F_problem_open_subform.Form!FormHeader.BackColor =
[Forms]![F_ColorSetting]![HeaderFormBackColor]

Me.F_problem_open_subform.Form!FormFooter.BackColor =
[Forms]![F_ColorSetting]![TitleBackColor]
---------------------------------------------------------------------------
Is there another name for the Header and Fotter Secion?

The name of the subform is OK, and the F_ColorSEtting Form is open.



Ofer Cohen said:
×©×œ×•× ×œ×™×ורה

1. What is the error?
2. Is the form F_ColorSetting open when you run the code
3. F_problem_open_subform - need to be the name of the sub form control name
within the main form
4. What are you trying to do?


--
Good Luck
BS"D


לי×ורה said:
I try to change the backcolor of a subForm details section ,hesder and footer
from the main Form.

I tried this but recieved an error:

"F_problem_open_subform" name of the sub form.

Me.F_problem_open_subform.Form.Detail.BackColor =
[Forms]![F_ColorSetting]![DetailsBackColor]

Me.F_problem_open_subform.Form!FormHeader.BackColor =
[Forms]![F_ColorSetting]![HeaderFormBackColor]

Me.F_problem_open_subform.Form!FormFooter.BackColor =
[Forms]![F_ColorSetting]![TitleBackColor]
 
×©×œ×•× ×œ×™×ורה
Try

Me.F_problem_open_subform.Form.Section(1).BackColor = ...


--
Good Luck
BS"D


לי×ורה said:
The error:
"can't find the field 'FormHeader' referred to in your expression"

The "Detail" section is OK now!!

The lines are:
-------------------------------------------------------------------------------------------
Me.F_problem_open_subform.Form!FormHeader.BackColor =
[Forms]![F_ColorSetting]![HeaderFormBackColor]

Me.F_problem_open_subform.Form!FormFooter.BackColor =
[Forms]![F_ColorSetting]![TitleBackColor]
---------------------------------------------------------------------------
Is there another name for the Header and Fotter Secion?

The name of the subform is OK, and the F_ColorSEtting Form is open.



Ofer Cohen said:
×©×œ×•× ×œ×™×ורה

1. What is the error?
2. Is the form F_ColorSetting open when you run the code
3. F_problem_open_subform - need to be the name of the sub form control name
within the main form
4. What are you trying to do?


--
Good Luck
BS"D


לי×ורה said:
I try to change the backcolor of a subForm details section ,hesder and footer
from the main Form.

I tried this but recieved an error:

"F_problem_open_subform" name of the sub form.

Me.F_problem_open_subform.Form.Detail.BackColor =
[Forms]![F_ColorSetting]![DetailsBackColor]

Me.F_problem_open_subform.Form!FormHeader.BackColor =
[Forms]![F_ColorSetting]![HeaderFormBackColor]

Me.F_problem_open_subform.Form!FormFooter.BackColor =
[Forms]![F_ColorSetting]![TitleBackColor]
 
Thanks, It is OK now

Liora

Ofer Cohen said:
×©×œ×•× ×œ×™×ורה
Try

Me.F_problem_open_subform.Form.Section(1).BackColor = ...


--
Good Luck
BS"D


לי×ורה said:
The error:
"can't find the field 'FormHeader' referred to in your expression"

The "Detail" section is OK now!!

The lines are:
-------------------------------------------------------------------------------------------
Me.F_problem_open_subform.Form!FormHeader.BackColor =
[Forms]![F_ColorSetting]![HeaderFormBackColor]

Me.F_problem_open_subform.Form!FormFooter.BackColor =
[Forms]![F_ColorSetting]![TitleBackColor]
---------------------------------------------------------------------------
Is there another name for the Header and Fotter Secion?

The name of the subform is OK, and the F_ColorSEtting Form is open.



Ofer Cohen said:
×©×œ×•× ×œ×™×ורה

1. What is the error?
2. Is the form F_ColorSetting open when you run the code
3. F_problem_open_subform - need to be the name of the sub form control name
within the main form
4. What are you trying to do?


--
Good Luck
BS"D


:

I try to change the backcolor of a subForm details section ,hesder and footer
from the main Form.

I tried this but recieved an error:

"F_problem_open_subform" name of the sub form.

Me.F_problem_open_subform.Form.Detail.BackColor =
[Forms]![F_ColorSetting]![DetailsBackColor]

Me.F_problem_open_subform.Form!FormHeader.BackColor =
[Forms]![F_ColorSetting]![HeaderFormBackColor]

Me.F_problem_open_subform.Form!FormFooter.BackColor =
[Forms]![F_ColorSetting]![TitleBackColor]
 
Back
Top