how to link list box with combo box values (1 Viewer)

iworkonline

Registered User.
Local time
Today, 04:45
Joined
May 25, 2010
Messages
44
Hi Guys

I have a combo box and a list box on my form.
Combo Box values are populated form a table and list box values are popluated with the folowing query
Code:
SELECT Actions.Customer_Scenarios, Reasons.Reason
FROM Actions INNER JOIN Reasons ON Actions.Action_ID = Reasons.Reason_ID
WHERE (((Actions.Customer_Scenarios)=[Forms]![Shippper_Info]![cmbActions]));

When I open the form the combo box values are populated which is ok and list box is blank which is also fine.

I want to update the list box with data in the Reasons table based on the choice in the combo box.

I am not sure how will I accomplish this task?

I am thinking that I may have to write code in the Combo Box's After_Update event.
Thanks for your help.
 

pbaldy

Wino Moderator
Staff member
Local time
Today, 04:45
Joined
Aug 30, 2003
Messages
36,125
Geez, talk about your slow fingers! :eek:
 

vbaInet

AWF VIP
Local time
Today, 12:45
Joined
Jan 22, 2010
Messages
26,374
Haha! You were probably busy updating your website ;)

Interesting that yours has got "www" and mine hasn't.
 

pbaldy

Wino Moderator
Staff member
Local time
Today, 04:45
Joined
Aug 30, 2003
Messages
36,125
That is interesting; and both work fine. The magical internet knows where you want to go. "FM" as my wife the telephone engineer would say. :p
 

iworkonline

Registered User.
Local time
Today, 04:45
Joined
May 25, 2010
Messages
44
Hello Paul

Thanks for the sample code. I added a list box to your code and it displays the cities whenever the cboState1 value changes.

This is the best forum ever.
 

pbaldy

Wino Moderator
Staff member
Local time
Today, 04:45
Joined
Aug 30, 2003
Messages
36,125
Glad it worked for you!
 

Users who are viewing this thread

Top Bottom