|
|
#1 |
|
Frenzied Member
Join Date: Feb 07
Location: Malaysia
Posts: 1,349
![]() |
combo box problem
I use combo box and have 3 items. This combo box follow a sequence.Let say, I choose the activity 2.How I can make the items to the first activity on click event?
Private Sub Cal1_Click() end sub this is the first activity "Menebas jerami dengan ‘rotor slasher’. Perlu dilakukan secepat mungkin selepas menuai. Jika lewat batang jerami akan susah dipotong" and the last activity is "Memeriksa status kesuburan tanah dengan mengambil sample tanah untuk analisis dan memereksa variasi tanah dengan mengambil bacaan EC untuk dibuat peta variasi" Private Sub Form_Load() Combo1.AddItem "Menebas jerami dengan ‘rotor slasher’. Perlu dilakukan secepat mungkin selepas menuai. Jika lewat batang jerami akan susah dipotong." Combo1.AddItem "Memeriksa pasarana, membina taliair, parit buang dan kotak kawalan bagi setiap lot, jika belum ada." Combo1.AddItem "Memeriksa status kesuburan tanah dengan mengambil sample tanah untuk analisis dan memereksa variasi tanah dengan mengambil bacaan EC untuk dibuat peta variasi." End Sub |
|
|
|
|
|
#2 |
|
Frenzied Member
Join Date: Feb 07
Location: Malaysia
Posts: 1,349
![]() |
Re: combo box problem
could somebody help me
|
|
|
|
|
|
#3 |
|
INXSIVE
Join Date: Sep 01
Location: Melbourne, Australia
Posts: 7,349
![]() ![]() ![]() ![]() |
Re: combo box problem
You could use the ListIndex to identify which item is selected. 0 being the first Item, 2 being the last (in this example).
__________________
Handy References: MSDN Library Home ADO Tutorial Excel Tutorial MZTools (VB6)
|
|
|
|
|
|
#4 |
|
Frenzied Member
Join Date: Feb 07
Location: Malaysia
Posts: 1,349
![]() |
Re: combo box problem
could you give me a example of using listIndex for combo box
|
|
|
|
|
|
#5 |
|
Fanatic Member
Join Date: Sep 06
Location: London, UK
Posts: 737
![]() |
Re: combo box problem
I not sure if I follow you but is this what you are after?
VB Code:
Can you explain what you are after any better? |
|
|
|
|
|
#6 |
|
Frenzied Member
Join Date: Feb 07
Location: Malaysia
Posts: 1,349
![]() |
Re: combo box problem
Actually, I use calender control and combo box. The item list in the combo box is
Private Sub Form_Load() combo1.additem "activity1" combo1.additems " activity2" End Sub This items will list in the combo box. I just choose the items in the combo box for activity. Let say, I click the date in calender, and choose the items in combo box, let say activity2.So the sstab1 is true and I get the date information for activity2. Private Sub Combo1_Click() If Combo1.Text = "activity2." Then SSTab1.Visible = True end if The click event for calender is : Private Sub Cal1_Click() 'I want to put the code, that the first activity list is Activity1 in the combo box when I click the calender control end sub |
|
|
|
![]() |
|
||||||
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|