Cross-referencing Data

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

Guest

Not sure whether this question belogs in this area ...

I have an Issues table that I want to maintain a set of cross-references
relating to a Requirements table; 1 Issue, 0-to-n Requirements. I have
created a "junction" table - Xref - to represent the Issue_ID-Requirement_ID
cross-reference.

From a UI perspective, my main form has the Issue (and it's detail but not
the related requirements). I want to display the related Requirements
descriptions (not the Xref ID data) as rows in a datasheet in a separate form
with the Requirements descriptions as a combo box. For user simpliciity I'd
also like to use the Datasheet controls for selecting an appropriate
Requirement (the combo box limited to the contents of the Requirements
table), and adding and deleting records.

I've tried a number of different combinations with the closest solution
being a subform that performs a query on Xref the based on the passed
Issue_ID (and joined with the Requirements table) to populate the datasheet.
I was also able to pass and display the Issue description (and ID) to the
subform. But I have been unable to figure out how to populate the Xref table
from the Requirements Description combo box on the datasheet without
resorting to coding. Is this possible?

Thanks.
 
Casey,

You may be able to set up a master - child relationship between the main
form and the subform using the Xref ID. This works by only showing records
in the subform that match the id selected in the main form.

An alternative is to use the bound value of the combobox within the query
used as the recordsource of the subform. You do this by right clicking in
the criteria field of the appropriate column in the query window and
selecting the build option then select forms -> loaded forms -> MainFormName
and double clicking on the combobox name.
This will put something like [Forms]![MainFormName]![comboboxname] as the
criteria. In this case you may have to add the code
"SubformName.Form.Requery" to the After_Update procedure of the combobox.

Rod.
 
Back
Top