Hi and thanks for taking the time
I am writing a new database and am setting up some templates. In order to make changing the color of elements in forms and reports easy I would like to define them when the form loads.
I have created a module to define the colors by using public variables. e.g.,
Hi
Now, in the OnLoad event of my form template I would like to set the ForeColor for all controls. My problem is that I can't figure out how to reference this. It would seem to me that I should be able to do something like this.
Hi
That way I could change the ForeColor in all my forms simply by changing the value of longForeColor.
Using Me.ForeColor doesn't work and I'm wondering how (or if) one can set the ForeColor for all controls that will be created using this template.
I have found lots of information on doing this to individual controls but not to an entire form.
Thanks
AR
I am writing a new database and am setting up some templates. In order to make changing the color of elements in forms and reports easy I would like to define them when the form loads.
I have created a module to define the colors by using public variables. e.g.,
Code:
Public longForeColor as Long
longForeColor = RGB(###,###,###)
Now, in the OnLoad event of my form template I would like to set the ForeColor for all controls. My problem is that I can't figure out how to reference this. It would seem to me that I should be able to do something like this.
Code:
Private Sub Form_Load()
Me.ForeColor=longForeColor
End Sub
That way I could change the ForeColor in all my forms simply by changing the value of longForeColor.
Using Me.ForeColor doesn't work and I'm wondering how (or if) one can set the ForeColor for all controls that will be created using this template.
I have found lots of information on doing this to individual controls but not to an entire form.
Thanks
AR
Last edited: