refresh or reload the combobox.

B

billy_pit

Hi,
My project is in MS Acceess.
In that I have one form in which there are 3 comboboxes.
1st one is independent,
2nd one is dependent on 1st one,
3rd one is dependent on both 1st and 2nd.
Now when I select an item from the 1st combobx it will generate the list for 2nd combobox,
after that when I select an item from 2nd combbox then it will generate the list based on selection of value from the 1st and 2nd comboboxes.
even when I select another item instead of previous one then it will also generate the list based on new selection, for that I am using PalletNo_Combo.Requery in the AfterUpdate event of the 1st combobox.
But this is not my problem, I want this one.
when I select another value from 1st combobox even I already selected
one time before and when I got focus on 2nd combobox, it have to
reload or referesh the 2nd combobox and remove the previous item from
combobox which I selected first time.
So it means I want to refresh or reload the combobox.
I am using this but I want thing like this

Private Sub CustomerCode_Combo_AfterUpdate()
ItemNo_Combo.Refresh/Reload
ItemNo_Combo.Requery
End Sub

Thanks
 
M

Marshall Barton

billy_pit said:
2nd one is dependent on 1st one,
3rd one is dependent on both 1st and 2nd.
when I select another value from 1st combobox even I already selected
one time before and when I got focus on 2nd combobox, it have to
reload or referesh the 2nd combobox and remove the previous item from
combobox which I selected first time.
So it means I want to refresh or reload the combobox.
I am using this but I want thing like this

Private Sub CustomerCode_Combo_AfterUpdate()
ItemNo_Combo.Refresh/Reload
ItemNo_Combo.Requery
End Sub


Assuming I have the names of the combo box's right, he
customer combo box should have code like:

Private Sub CustomerCode_Combo_AfterUpdate()
ItemNo_Combo = Null
thirdcombo = Null
ItemNo_Combo.Requery
End Sub

The item combo box's code would be like:

Private Sub ItemNo_Combo_AfterUpdate()
thirdcombo = Null
thirdcombo.Requery
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top