Combo Box Query: Listing a subset

R

Robert Neville

The solution to this scenario seems straight-forward, yet my mind has
not been forthcoming with a direct route. My Project form has a tab
control with multiple sub-forms; these distinct sub-forms relate
addresses (multiple addresses); companies, contacts, and tasks to each
project.

My challenge lies with the task sub-form which links to the Project
form through ProjID. No problems occur with this link; and the task
record changes when advancing to the next project. The task record
links back to the Master table through ProjID, CompID, and ContID. In
other words, the task record generally holds actions for the Project,
Company, and Contact tables; or any combination thereof.

My rationale involved creating a continuous form with combo box that
displays the full contact name and the full company name. The ContID
and CompID fields just signify the index number value. So both combo
boxes have a query that display the full name bounded to the ID field
(example below); bound to column one. But the combo box should list
the subset of records for the current project record. If you have XXX
project, then companies associated with XXX should drop down in the
box; not all companies.

At this juncture, I lose my sense of direction. My ideas point towards
code or a query. The complexity of the table relationship adds
confusion. So I stopped here and wrote this post to make sense of
scenario. Each master table links to the other tables through an
intermediary table (relationship table) Hopefully, someone may lead in
the right direction.

SQL Statement for the ContID Combo box
SELECT tblCont.ContID, [FirstName] & " " & [LastName] AS FullName
FROM tblCont
ORDER BY tblCont.LastName;
 

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