Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Object Problems
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Divers
Thread ID:
00094531
Message ID:
00094538
Vues:
24
>Hi,
>
>Here's how my app is currently set up:
>
>It is run with root.prg which sets up some variables and the default directory, etc. Then a form is run with DO FORM MAIN.SCX and things are set in motion with READ EVENTS. If you click the Search button on the MAIN form, it is RELEASEd and the search form is run with DO FORM SEARCH.SCX.
>
>In the Activate event I have:
> PUSH KEY CLEAR
> ON KEY LABE F1 SEARCH.NAM.SETFOCUS
>
>In other words, I want the F1 key to jump to the NAM field on the form. This works fine if I run the form alone, but when it's called by MAIN, I get an error saying that there's no object named SEARCH. Sure enough, when I look in the debugger, there is no such object. What am I doing wrong?
>
> All help appreciated,
> Rob

Rob, use this syntax to call your form:
DO FORM SEARCH.SCX NAME SEARCH

There is also another way:

***Your Activate event
PUSH KEY CLEAR
ON KEY LABE F1 _screen.activeform.NAM.SETFOCUS()

HTH,

NIck
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro

"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform