ComboBox list values

M

Monty

I have a situation I'm not quite sure how to approach. I have a form
with two combo boxes on it. ComboBox1's list values get filled in when
the form is opened. It was generated using a wizard when I created the
combo box. ComboBox2's list values come from an SQL statement. I've
managed to update the value of ComboBox2 when a list value is selected
in ComboBox1, but I'd also like to update ComboBox1's list when a
particular value is selected from Combobox2. I've searched through the
online help and I believe I'd be updating Combobox1's RowSource
property, but I can't find an example on how to do that in VisualBasic.


Am I approaching the problem correctly?
Does anyone know how to do this?

Thanks
 
M

Monty

Something told me that it would be just that simple, but I couldn't
find an example.

Do I presume that strSQL would mean "<SQL statement>"?

And thanks :)
 
D

Douglas J. Steele

I was trying to show setting a variable strSQL to whatever your SQL Select
statement is, and then using that variable in the assignment, but that isn't
actually necessary.

The reason I always use a variable is that if there are problems, I can
easily see what SQL the code is generating for debugging purposes.
 

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