Message 1 of 4
Combo Box Clear problem

Not applicable
05-30-2002
11:43 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi all,
I have a form with three combo boxes. On this form I have a "clear" button
that allows the user to "clear" the values of the combo boxes when it is
clicked. Here is what is going on: I have one combo box (cboA) that
populates two others (cboB and cboC). cboA contains items 1-9. When an
item is selected, cboB and cboC are enabled and populated based on what was
selected in cboA. Basically cboB is populated with very convoluted layer
names and cboC is populated with the definition of those layers (this way
the user can pick by layer name or layer description). So when a layer in
cboB is selected, the corresponding layer description is highlighted in
cboC. When the clear button is pressed, the current value of all three
combo boxes are supposed to "clear", but cboC will not clear properly. If
cboC is selected first rather than cboB, and the clear button is clicked,
all three clear with no problems. Below is the code for the clear button.
It almost seems like the enabled property of cboC is firing before the clear
property when cboB has been selected first. Does anyone have any insight as
to why this may be happening?
Private Sub cmdClear_Click()
cboFeatureType.Clear '(cboA)
cboSDSLayName.Clear '(cboB)
cboObjType.Clear '(cboC)
cboSDSLayName.Enabled = False
cboObjType.Enabled = False
Call UserForm_Initialize
End Sub
TIA,
Rob
I have a form with three combo boxes. On this form I have a "clear" button
that allows the user to "clear" the values of the combo boxes when it is
clicked. Here is what is going on: I have one combo box (cboA) that
populates two others (cboB and cboC). cboA contains items 1-9. When an
item is selected, cboB and cboC are enabled and populated based on what was
selected in cboA. Basically cboB is populated with very convoluted layer
names and cboC is populated with the definition of those layers (this way
the user can pick by layer name or layer description). So when a layer in
cboB is selected, the corresponding layer description is highlighted in
cboC. When the clear button is pressed, the current value of all three
combo boxes are supposed to "clear", but cboC will not clear properly. If
cboC is selected first rather than cboB, and the clear button is clicked,
all three clear with no problems. Below is the code for the clear button.
It almost seems like the enabled property of cboC is firing before the clear
property when cboB has been selected first. Does anyone have any insight as
to why this may be happening?
Private Sub cmdClear_Click()
cboFeatureType.Clear '(cboA)
cboSDSLayName.Clear '(cboB)
cboObjType.Clear '(cboC)
cboSDSLayName.Enabled = False
cboObjType.Enabled = False
Call UserForm_Initialize
End Sub
TIA,
Rob