>The Form name is uditempl. From within the Form I have no problems. I need to call this Method, from either a Class or a program file if possible.
>
>Thisform.pageframe1.page1.itemsgrid.setfocus()
>
>Thanks
First, you need to have an object reference to the form. This is best done when you instantiate (open) the form. For example, if your form is saved as a class:
local loForm
loForm = CreateObject("cClient")
Or, if the form is saved as a form:
local loForm
do form FrmClient name loForm
Now, from outside the form, you can use
loForm (or whatever you call it - it is your variable) just as you would use
ThisForm from within the form. For instance, your example becomes:
loForm.pageframe1.page1.itemsgrid.setfocus()
or you can call a form method:
loForm.RecalculateTotals()
Saludos,
Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)