using constants as a propoerty value

  • Thread starter Thread starter Mark Kubicki
  • Start date Start date
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
 
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

--
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000

Message posted via AccessMonster.com
 
Back
Top