In the code below you are specifying thisform.textbox1. That does work but what I am looking for is a way that the function can be independent of particular objects on the form.
N.
>>Hi,
>>
>>I am trying to create a function that I am going to put in the refresh method of several objects on my form. However the function should only run when the focus is on a particular object. I would like to do something like "if this.focus = .t. then do...". How can I determine if the focus is on a current object?
>>
>>N
>
>if type('thisform.ActiveControl.name')='C' and thisform.ActiveControl=thisform.textbox1
> do mycode
>endif