Click to See Complete Forum and Search --> : combobox, label, command


serdaryorulmaz
October 20th, 2001, 02:15 PM
please help me..
i have put material codes in a combobox and added a lable to show the specifications of that chosen material. and i have put a command button. when i chose the material from the combobox i press the command button and show the specification in lable but i am having problem. when i chose the material and pressing the command button the first specification shows up in the label but when i change the material in the combobox and press the enter the new materials specification does not show up but first materials stay there forever..i had written a code for that transfer like that.
If Combo1.DataField = C10 Then
Label3.Caption = 295
End If
If Combo1.DataField = 2 - C15 Then
Label3.Caption = 355
End If
If Combo1.DataField = Ck10 Then
Label3.Caption = 295
End If
If Combo1.DataField = Ck15 Then
Label3.Caption = 355
End If
If Combo1.DataField = 15 - Cr3 Then
Label3.Caption = 355
End If
end sub
if you know what i should to fix it.. please help me...
respects..



Serdar Yorulmaz

srinika
October 21st, 2001, 10:17 PM
1. Use Combo1.Text instead of DataField
This will resolve ur problem.
2 .Better to have ElseIf rather than having individual If.... checks
Srinika

Iouri
October 22nd, 2001, 07:35 AM
After assigning label caption try
Label1.Refresh

Iouri Boutchkine
iouri@hotsheet.com