>That works the same. Does not suprise you?
>
>>>I have this simplified code:
>>>
>>>WITH goToolBar
>>> .LockScreen = .T.
>>> IF TYPE('.cmdBoxing') = 'O'
>>> .RemoveObject('cmdBoxing')
>>> .LockScreen = .F.
>>> ENDIF
>>>ENDWITH
>>>
>>>That code is executed twice. First time it works fine, second it tries to remove the button again because TYPE('.cmdBoxing') = 'O' is still true. Reffering goToolBar.cmdBoxing.Name gives an error.
>>>What am I missing?
>>
>>
>>WITH goToolBar
>> .LockScreen = .T.
>> IF PEMSTATUS(goToolBar,'cmdBoxing',5)
>> .RemoveObject('cmdBoxing')
>> ENDIF
>> .LockScreen = .F.
>>ENDWITH
>>
goToolBar.LockScreen = .T.
IF PEMSTATUS(goToolBar,'cmdBoxing',5) AND;
NOT ISNULL(goToolBar.cmdBoxing)
goToolBar.RemoveObject('cmdBoxing')
ENDIF
goToolBar.LockScreen = .F.
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.