Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Running code before or after :: scope resolution
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00048292
Message ID:
00048308
Vues:
19
>I have a form class that I use for multiple applications to allow a user to login. In the click event of the form I create for each application, I use the following code:
>
>ConnectName = 'name_of_connection'
>DSNName = 'name_of_dataset'
>frmlogin.cmdOK::Click
>
>Now I have one application where I need to use the user's UserID in another part of the application. So I tried creating an application property and using it like this:
>
>ConnectName = 'name_of_connection'
>DSNName = 'name_of_dataset'
>frmlogin.cmdOK::Click
>goApp.UserIDEntered = ThisForm.txtUserID
>
>But when I do this my application just stops (with no error messages). The login form just stays on the screen and I can't close it. I also tried it this way, with the same results:
>
>ConnectName = 'name_of_connection'
>DSNName = 'name_of_dataset'
>Test = ThisForm.txtUserID
>frmlogin.cmdOK::Click
>goApp.UserIDEntered = test
>
>Why won't this work?
>
>Jeff

Could it be simple error? Try:
goApp.UserIDEntered = ThisForm.txtUserID.Value
I would also presume, that you have problem with error trapping routine.
Edward Pikman
Independent Consultant
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform