>>>>Hi, I have a cmdbutton that activates a combobox. Iwas hoping to have the said cmbbutton toggle the combobox on/off when clicking the cmdbutton, and although all my code is there, it does not work. hmmm.
>>>
>>>Does your code look like:
>>>***button.click event
>>>Thisform.combo1.enabled=!Thisform.combo1.enabled
>>
>>I added that but no effect. It seems that when the cmdbutton is clicked and the combobox is revealed, clicking on the cmdbutton has NO effect even for other operations.
>
>Firslty, could you post all code from button.click event?
>Secondly, what exactly you expect to get from the combo: enabled/disabled or something else?
Sure, as follows:
mode1 = 'REVIEW'
*Thisform.mycombobox1.enabled=!Thisform.combobox1.enabled
sele 1
use category
thisform.mycombobox1.visible=.t.
With Thisform.mycombobox1
.RowSourceType=2
.RowSource=""
.rowsource= 'category'
.Requery
Endwith
thisform.mylabels1.visible=.f.
thisform.mytextbox2.visible=.f.
thisform.mylabels2.visible=.f.
thisform.mytextbox1.visible=.f.
thisform.refresh
Thisform.myCombobox1.value=category.kind
clea
?thisform.mycombobox1.visible=.t.
wait
if thisform.mycombobox1.visible=.t.
thisform.mycombobox1.visible=.f.
endi
thisform.refresh
"Build a man a fire, and he's warm for a day.
Set a man on fire, and he's warm for the rest of his life."