Using Junctiontable with form/subform

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

Guest

I have made a classic DBdesign:
Module table with ModuleNum, ModuleName
Component table with ComponentNum, ComponentName
Junctiontable with ModuleNum, ComponentNum as combined key.

What i want to do is make a Modules Form, in which i have the Module
details, plus a subform showing ComponentNum and ComponentName for all
Components in Junctiontable, that have ModuleNum = Module.ModuleNum.

I have found out how to add a subform that links directly to JunctionTable,
but all my attempts at using JOIN SQL statements, to populate a subform with
data from the Components table have failed miserably.

My latest attempts have been along the lines of adding VB code to the
Current event.

Any suggestions?
 
The subform should be based on the JunctionTable. Add a combo box control on
the subform
Control Source: ComponentNum
Row Source: SELECT ComponentNum, ComponentNum *& " - " & ComponentName FROM
Component ORDER BY ComponentNum;
Bound Column: 1
Column Widths: 0,3
Columns: 2

Make sure the Link Master/Child properties of the subform control are set to
ModuleNum.
 
Back
Top