Help writing an SQL query.

M

Mat J-Ho

Hi all. I'm new to access and trying to write a contacts database for
a college project.

A contact can have many disciplines, and each discipline can have many
subdisciplines. This means the contact can have many subdisciplines.

I have created a disicpline and subdicipline table, created a
realtionship between the 2.

I have a subform which allows the user to select the discipline and
subdiscipline from a table that links the two tables.

What I cannot do though is filter the subform so that when the user
selects a discipline, only the relevant subdisciplines are shown.

How can I do this? I'm sure its very basic considering some of the
posts I've read through here, but I am new to this stuff so appreciate
the time you will be taking.

Thanks!
 
M

Michel Walsh

With the discipline in the main form, the sub-form based on the
discipline-subdisciplines table, built a parent-child link. In fact, make a
form with the subdisciplines first, call it subdis. Next, make a second form
the main form, based on the disciplines table. Add the control that will get
the discipline value. Next, with the Wizard active, insert a subform
control, use the first form you created, and specify the 'discipline' value
as the link between the main form and the sub-form. The design properties
will then be set for you, by the wizard.

That is, indeed, a form design question, rather than a query question :)



Hoping it may help,
Vanderghast, Access MVP
 

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