Help needed for ComboBox

G

Guest

Hi,
I have a list of three combo boxes. The entry in the second depends on the entry in first, same for the second.
Before the entries are filled, I have used Combobox2.Clear and Combox3.Clear.

The problem arises when I try to select the option from the drop down list again. These two statements are supposed to be executed. Although Combox2.Clear runs, the progran gives an error on ComboBox3.Clear.
Any idea why? and what to do to avoid it?
TIH
Shilps
 
B

Bob Phillips

Combobox2.Clear will remove all of the items. Not a good idea.

When you say 2 is dependant on 1, do you men that if you select item 10 in
1, then item 10 in 2 should be shown, if so, then use something like

Combobox2.ListIndex = Combobox1.ListIndex

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

Shilps said:
Hi,
I have a list of three combo boxes. The entry in the second depends on the
entry in first, same for the second.
Before the entries are filled, I have used Combobox2.Clear and Combox3.Clear.

The problem arises when I try to select the option from the drop down list
again. These two statements are supposed to be executed. Although
Combox2.Clear runs, the progran gives an error on ComboBox3.Clear.
 
T

Tom Ogilvy

What does the error message say? If combobox3 is the name and it is visible
to the routine, it shouldn't cause a problem.

in your email
Combox3.Clear
is misspelled. Is it possible you have a spelling error in your code as
well?

--
Regards,
Tom Ogilvy

Shilps said:
Hi,
I have a list of three combo boxes. The entry in the second depends on the
entry in first, same for the second.
Before the entries are filled, I have used Combobox2.Clear and Combox3.Clear.

The problem arises when I try to select the option from the drop down list
again. These two statements are supposed to be executed. Although
Combox2.Clear runs, the progran gives an error on ComboBox3.Clear.
 
G

Guest

Sorry for the typo in the mail. The spelling is correct in the code. I am getting a runtime error 2147467259(80004005). Unspecified error.
 
G

Guest

No Bob. What I mean is that for different options in comboBox1, there are different lists in ComboBox2.What list will fill ComboBox2 depends on what is the option in ComboBox1.
 
B

Bob Phillips

bob . phillips @ tiscali . co . uk

remove the spaces. The mail address you get here has a spam trap.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 

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