Filtering on combo text

roger_anderson

New member
Local time
Today, 09:55
Joined
Nov 26, 2001
Messages
5
Aaaargh! It's a couple of years since I got my hands dirty in Access and I seem to have forgotten more than I thought! :(
I have a simple database which includes tables STOPS (stopID, stop name, routeID, Cost band), JOURNEY(CustID, routeID, stopID), and ROUTES (routeID, Route name, Bus co).
I have a main form with the customer number on linking to a sub-form on which the user will select the route from a combo box and then the stop from a combo box. All works fine but I want to filter the stop combo box to show only stops on the route already chosen.
I've done similar before but I have tried all sorts and failed to get anything to work. Any help appreciated.
 
I won't claim to be very good at Access but would like to give you my opinion as to how I would go about this problem.

In the Stops Combo Box, you need to go to Properties, Data, Row Source and then click on the dots to the right.

This will open the sql select criteria.

You can then set a criteria so that it filters based on the route combo box

Looking at your field names , I guess it is route ID from the Journey Table should = the route ID on the stops table.

Hope that helps

Phil
 
Tried that

Thanks but tried that and it then presents only data from previously entered records in the journey table.
I am sure that when I've done this before I produced a filter which was turned on when the Route combo box changed so that only the appropriate stops on the route were visible. I've tried this but must be missing a step somewhere, or perhaps I'm filtering the wrong object; should it be the form or the Stops combo?
 
You need to do refresh the combo for stops when you leave/change the routes combo.

You need to put the filter on the stops combo
 
Last edited:

Users who are viewing this thread

Back
Top Bottom