Dependent combo boxes II

Skippymouse

New member
Local time
Today, 06:02
Joined
Jan 5, 2001
Messages
8
And the (painful) saga continues.

In review, I have a query based combo box on a form which selects a ProviderName. In a subsequent combo box I have SiteNames. The idea is to get only the SiteNames directly associated with the ProviderName selected to appear in the second combo box. I have tried using a query to reference the selection in the ProviderName box and list only the SiteNames which are related to that Provider. No joy. Returns no results. I tried code and Dlookup an still no joy.

I think it may be a SetValue problem but I am unsure since VBA and I are still pretty much strangers. I am not very familiar with filters and things like that so I am now officially totally lost.

Is there some point I have foolishly overlooked that is preventing me from getting results?
 
Your first method should have worked. I would have had combo1 showing me the ProviderNames and combo2 the site names. Combo2's record source would be the query. The query would have the two fields and the criteria for ProviderName would be:
forms!YourForm!combo1
The Afterupdate event for Combo1 would be:
Combo2.Requery
If you can't get it to work, let me know and I'll send you a sample database.
 
Finally got it. I appreciate the suggestions in this and other topics. Your help was invaluable!
 

Users who are viewing this thread

Back
Top Bottom