using constants as a propoerty value

M

Mark Kubicki

lets say i want to set, on multiple forms, the header background color to
#123456 (as shade of light blue)

can i declare "const LtBlue = #123456" (where i would do this i do not know)

and then set the property for the header background color to LtBlue (on each
form)
or
do i need to add some code for the on-activate event of each form that sets
the property to LtBlue?

thanks in advance,
-mark
 
L

Linq Adams via AccessMonster.com

In a standard Module, near the top, under the

Option Compare Database

statement, declare your constant like this

Public Const YourConstantName = YourConstantValue

then in any code module (the code behind a form you can use it, like

Me.Detail.BackColor = YourConstantName
 
Top