Combo Boxes

  • Thread starter Thread starter David Tunstall
  • Start date Start date
D

David Tunstall

I have two combo boxes. The second combo box values
depend on what was selected in the first combo box. My
only problem is that if I change the first combo box
after I have already picked a value, my second combo box
isn't updating to show the new values. I.E First Combo
Box I choose Pontiac so then second combo box lists
Firebird, etc...... But if I then change the first combo
box to Ford, all the pontiac cars are still showing in
the second combo box.

Hope this makes sense

Thanks
David
 
Hi,

I think you need to requery the second combo box every time the first one is
updated.

Try inserting code like the following in to the first Combo Box's After
Update Event:

If Len(Me.cboComboBox1 & "") > 0 Then 'Only do if something is selected
Me.cboComboBox2.Requery 'This control will now requery the next time it
is used
Me,cboComboBox2.SetFocus 'Move the focus to second combo box
End If

HTH

--

Cheers
Mark

Free Access/Office Add-Ins at:
http://mphillipson.users.btopenworld.com/
 
Cheers Mark
-----Original Message-----
Hi,

I think you need to requery the second combo box every time the first one is
updated.

Try inserting code like the following in to the first Combo Box's After
Update Event:

If Len(Me.cboComboBox1 & "") > 0 Then 'Only do if something is selected
Me.cboComboBox2.Requery 'This control will now requery the next time it
is used
Me,cboComboBox2.SetFocus 'Move the focus to second combo box
End If

HTH

--

Cheers
Mark

Free Access/Office Add-Ins at:
http://mphillipson.users.btopenworld.com/





.
 
Back
Top