View Full Version : Dependent combo boxes II


Skippymouse
01-24-2001, 07:22 AM
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?

Neal
01-24-2001, 08:50 AM
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.

Skippymouse
01-25-2001, 10:57 AM
Finally got it. I appreciate the suggestions in this and other topics. Your help was invaluable!