The actual error was resolved by checking for an empty method before trying to reset it to default. Hugo's tip did speed up the program, and I gave credit for that.
>Hi Jim,
>
>I think you meant to give the stars to Hugo :)
>
>>Hugo,
>>I followed your tip, and I surrounded the section of code that calls
ResetToDefault with an If empty() and that took care of it.
>>
>>The FOXOBJECT clause made it quicker.
>>
>>thanks,
>>
>>
>>Procedure ProcessSrchField
>> Lparameters oCtrl
>>
>> Strtofile(oCtrl.Class + [:] + oCtrl.Name+Chr(13)+Chr(10),[c:\crap\mylog.txt],1)
>> Local cSrc, cAlias, cTag
>> cSrc = oCtrl.ControlSource
>>
>> cAlias = Getwordnum(cSrc,1,[.])
>> cTag = Getwordnum(cSrc,2,[.])
>> oCtrl.icsrchAlias = cAlias
>> oCtrl.icsrchTag = cTag
>> cSrc = oCtrl.ReadMethod([GotFocus])
>> If !Empty(cSrc)
>> oCtrl.ResetToDefault([GotFocus])
>> Endif
>>Endproc
>>
>>
>>>Jim,
>>>
>>>Try adding the FOXOBJECT clause to the FOR EACHs to see if that makes a difference
Jim Newsom
IT Director, ICG Inc.