Results 1 to 3 of 3

Thread: Passing variable between forms...

  1. #1

    Thread Starter
    Member
    Join Date
    Jul 1999
    Posts
    51

    Post

    I have a login form that asks for a user name and password. In that form I have declared some variables as Public. When the login is successful I show the main form. But when I try to access the variables from the main form they are empty. What do I need to do to make these variables global between forms?

    Thanks

  2. #2
    Guru Aaron Young's Avatar
    Join Date
    Jun 1999
    Location
    Red Wing, MN, USA
    Posts
    2,177

    Post

    If the Login Form is still Loaded you can refernce the Form to Access its Public Variables, eg.

    sUserName = frmLogin.sPublicUserVar

    Otherwise, declare the Variable as Global/Public in a Module, this way the Variable can been seen by all Components of your Application.


    ------------------
    Aaron Young
    Analyst Programmer
    [email protected]
    [email protected]

  3. #3

    Thread Starter
    Member
    Join Date
    Jul 1999
    Posts
    51

    Post

    Thanks Aaron

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width