>In Fox for Dos it was read level events (I've been at this a long time!)
>What happens is that any form started from the toolbar and not from the menu system is not on the same "level" as the menu system and all sorts of strange errors occur. The forms started from the menu cannot reference the form started from the toolbar because they believe it is not an "Object". That is the error "Form 'pm2p008' is not an object!"
>
>We have traced this down in the past to read level events.
>
>Donna
Donna,
Not rdlevel() but variable scope.
The difference is how menu and toolbar instantiate the forms. Menu creates a public object as running from command window does. Toolbar OTOH doesn't create a public object. Whenever you launch a form from toolbar form is added to _screen forms collection (2 per form - same oject, I don't know why 2 per form).
pm2p008 sounds to be the scx name. Loop _screen.forms collection to get scx name. Or if you want it to behave menu way create public var with scx name prior to 'do form' in toolbar and add name clause. ie :
public frmcustomer
do form customer name frmcustomer
Better create a custom oApp and add an array property to it to track forms.
You can also use _screen.activeform to get the reference.
Cetin