Leroy,
1 - Create one propertie (FirstField) on the button Class and write the name of the button in each form that you button class in.
2 - In the class, you do it:
Focus = "ThisForm."+This.FirstField+".SetFocus()"
&Focus
You can found more information at thread #
016875[]'s
Rodolfo Duarte
Ribeirao Preto - Sao Paulo - Brazil
>Hello Everyone!!!
>I have a button Class that has New/Save and Edit/Cancel in it. I want to do the following: In the Save routine I want to set the focus to the First Textbox Object on the Form. It has A tabindex = 1. I need to do this in the class.
>Question:
>Is there a way to Set The focus of the textbox another way besides by name
>ei. THISFORM.txtCtype.Setfocus()
>
>Thanks In advance
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Rodolfo Duarte