creating a combo box that uses data from another combo in that tab

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,
I'm trying to make what i think is an easy DB.
I have 2 tables:
"offices"- which has office_name and office_ID (key).
"jobs"- which has office_ID, job_title and job_ID (key).
I have a table with combo boxes.
I want one combo box to show me all the offices, which works fine.
I want the second combo to show me all the jobs that exist in the office i
just chosen.
This is where things ain't working.
I got this query:
SELECT jobs.job_title FROM (Table INNER JOIN offices ON
Table.[office_checked]=offices.[office_name]) INNER JOIN jobs ON
offices.[office_ID]=jobs.[office_id];

It returns the jobs, but only the jobs for records i already enterd, and the
jobs in ALL the offices that i have entered in.
I want it to show me the jobs for the current record i'm entering, and only
for it, regardless of any other record i entered in the past.

Thanks,
Raz.
 
Take a look via an on-line search (e.g., Google) for "cascading combo
boxes".

The basic concept is that you'll select an item in the first combo box, then
requery the second combo box, which is based on a query that uses a
selection criterion that points back to the choice in the first combo box.

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
Back
Top