PDA

Click to See Complete Forum and Search --> : Passing variable between forms...


desquite
Dec 10th, 1999, 01:18 AM
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

Aaron Young
Dec 10th, 1999, 01:42 AM
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
aarony@redwingsoftware.com
adyoung@win.bright.net

desquite
Dec 10th, 1999, 02:18 AM
Thanks Aaron