Home All Groups Group Topic Archive Search About

Making a variable available to all forms..

Author
3 Apr 2006 10:34 AM
rj
Hi all,

How do i make a variable that i can call in all my forms?
I want to get a value when the user logs in, and carry that value
throughout all the forms for queries etc.

Thanks in advance..

Author
3 Apr 2006 11:50 AM
SMS_Dev_Dept
Add a New Module to your project and add a friend property like this:

   Private m_MyVariable As Object
    Friend Property MyVariable() As Object
        Get
            Return m_MyVariable
        End Get
        Set(ByVal value As Object)
            m_MyVariable = value
        End Set
    End Property

Show quoteHide quote
"rj" wrote:

> Hi all,
>
> How do i make a variable that i can call in all my forms?
> I want to get a value when the user logs in, and carry that value
> throughout all the forms for queries etc.
>
> Thanks in advance..
>
>