I am wanting to set a Constant through out my database so any and all forms can reference it by just using the Constant name. The one conveant is that is really is not a constant. It is more of a variable. Here is an example, it goes in line with the security question posted previously.
Here is what I want to do:
Const WrkGrp as Long = Forms!frmWhosLoggedOn!lngWrkGrp
Const UserID as Long = Forms!frmWhosLoggedOn!lngUserID
Const txtUserName as Text = Forms!frmWhosLoggedOn!txtUserName
These are all constants in the sense it is the same while the one user is logged on. If another user logs on it changes but while they are logged on it is the same. I can use Dim in the Declarations but I have to set the Variable in the Sub or Function, it can't be set in the General Declarations. This is what I am wanting to avoid.
Questions are what is a way of doing this? How can I do this as a Global Application thing rather than having to declare these variables and setting these variables for every form?
Thanks
Remember the Past, Plan for the Future, yet Live in the Now for tomorrow may never come.
-etrain
Here is what I want to do:
Const WrkGrp as Long = Forms!frmWhosLoggedOn!lngWrkGrp
Const UserID as Long = Forms!frmWhosLoggedOn!lngUserID
Const txtUserName as Text = Forms!frmWhosLoggedOn!txtUserName
These are all constants in the sense it is the same while the one user is logged on. If another user logs on it changes but while they are logged on it is the same. I can use Dim in the Declarations but I have to set the Variable in the Sub or Function, it can't be set in the General Declarations. This is what I am wanting to avoid.
Questions are what is a way of doing this? How can I do this as a Global Application thing rather than having to declare these variables and setting these variables for every form?
Thanks
Remember the Past, Plan for the Future, yet Live in the Now for tomorrow may never come.
-etrain