How to Synchronized 3 combo boxes? HELP Please!

A

antonyeo

I have 3 tables (tblSubs), (tblStreets), and (tblnumbers). They ar
set up in the following way

tblSubs 8 record
IdSubs - P
Sub

[b:f88b360bc8]tblStreets[/b:f88b360bc8] 65 record
IDStreets - P
Street
IDSubs (same as tblSubs, IDSubs

[b:f88b360bc8]tblNumbers[/b:f88b360bc8] 1600 record
IDNumbers - P
Number
IDStreets (same as tblStreets, IDStreets

I will use a form with the three combo boxes (cmboSubs), (cmbStreets)
and (cmbNumbers). When I select the cmbSubs, cmbStreets wil
automatically provide only certain choices and when I select th
cmbStreets, cmbNumbers will only provide certain choices. there ar
other fields in the form for name, phone but are all text boxes an
do not affect the combo boxes

I have not made any table relationships (not sure how), nor an
queries, no form code just what I show above and the tables have al
the data inside already. I need to know what to do next and how.
Any help would be appreciated. I’m using Microsoft Access 2000
 
S

Steve Schapel

Antonyeo

For the Row Source of the cmbStreets combobox, use a query based on the
tblStreets table, but with a criteria to refer back to the cmboSubs
combobox. The SQL view of such a query will look something like this...
SELECT IDStreets, Streets
FROM tblStreets
WHERE IDSubs = [Forms]![YourForm]![cmboSubs]

For the Row Source of the cmbNumbers combobox, use a query based on the
tblnumbers table, but with a criteria to refer back to the cmbStreets
combobox. The SQL view of such a query will look something like this...
SELECT IDNumbers, Numbers
FROM tblnumbers
WHERE IDStreets = [Forms]![YourForm]![cmbStreets]

On the AfterUpdate event of the cmboSubs combobox, put code like this...
Me.cmbStreets.Requery

On the AfterUpdate event of the cmbStreets combobox, put code like this...
Me.cmbNumbers.Requery
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top