Advertisement

05.20.2008 at 09:43AM PDT, ID: 23417919
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

7.5

Query Based Upon Dependent Combo Boxes Won't Refresh

Asked by kmartinenko in Access Forms, Microsoft Access Database, Access Coding/Macros

Tags: ,

I have a problem with a pair of combo boxes that I am trying to use to query a table based upon the selections made in said combo boxes.

route_combo selects the distinct route from table InterstopData2
timeperiod_combo selects the distinct trip from table Query2 (see code snippets below for rowsource)

Now, the dependency relies on the selection from route_combo so that the route_combo_AfterUpdate() VBA code is

Me.timeperiod_combo.Requery

The timeperiod_combo box returns a list of times specific to the route selected in route_combo

*This Works Perfectly*
==================

Now, here's my problem.  I created a new query (Query3) that returns all rows and fields in the InterstopData2 table that match the selections from these two combo boxes.  It works perfectly for the very first selection (route 1) for route_combo, and the very first selection for timeperiod_combo (6:00 AM).  But when I close out the query table and select a new route and new time, the query does not refresh, and no rows or fields are returned.  See below for code snippet for said Query3

What am I missing here that is causing the query not to return data given a new selection other than the first row for each combo box?  
Start Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
/timeperiod_combo rowsource/
SELECT DISTINCT Query2.TRIP FROM Query2 WHERE ((InterstopData2.ROUTE)=Forms!Form1!route_combo); 
/end/
 
/route_combo rowsource/
SELECT DISTINCT InterstopData2.ROUTE FROM InterstopData2; 
/end/
 
/SQL for Query3/
SELECT InterstopData2.ID, InterstopData2.ROUTE, InterstopData2.STOP, InterstopData2.TRIP, InterstopData2.DIR, InterstopData2.LOCATION, InterstopData2.[ON], InterstopData2.[OFF], InterstopData2.LOAD, InterstopData2.RIDERSHIP, InterstopData2.RUNTIME, InterstopData2.SAMPLES
FROM InterstopData2, Query2
WHERE (((InterstopData2.ROUTE)=[Forms]![Form1]![route_combo]) AND ((InterstopData2.TRIP)=[Forms]![Form1]![timeperiod_combo]));
/end/
[+][-]05.20.2008 at 11:27AM PDT, ID: 21608818

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]05.20.2008 at 11:31AM PDT, ID: 21608862

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]05.20.2008 at 01:42PM PDT, ID: 21610159

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.20.2008 at 03:11PM PDT, ID: 21610815

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.20.2008 at 04:17PM PDT, ID: 21611095

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]05.20.2008 at 04:33PM PDT, ID: 21611166

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.20.2008 at 06:11PM PDT, ID: 21611506

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Access Forms, Microsoft Access Database, Access Coding/Macros
Tags: Access 2007, VBA, SQL
Sign Up Now!
Solution Provided By: capricorn1
Participating Experts: 2
Solution Grade: B
 
 
[+][-]05.20.2008 at 09:51PM PDT, ID: 21612189

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.22.2008 at 12:09PM PDT, ID: 21626695

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628