Getting or Inserting Data into Subform

M

melwester

I have 2 tables (Main table & Notes Table). My main form has a combo box
(unbound) and inserts the data into the main form from the Main table. No
problem there. The primary key in the Main Table is IDNumber.

The problem lies in the subform. The subform's record source is Notes
query. The NotesTable does not have a primary key. But the Main-table does.
The reason that Notes does not is it has more then one IDNumber of the same
but it matches the IDNumber on the Main-Table. The relationship between the
2 tables is many to many. I've tried one to many and that didn't work
neither.

For ex.
Main Table has one IDNumber for each company
Notes Table has 1 or more of the same IDNumber for each company:
1034
1034
1035
1036
1036
1036

I want to be able to pull in all lines from Notes associated with the
IDNumber pull in from the combo box on the main form.

I have the Master & Child link on the subform set to IDNumber and IDNumber
as this field is the same in both tables. Still I get no data on the
subform.

The mainform is controled by the combo box that the user will click on a
company name and the rest of the info pulls in. Including the IDNumber.
This IDNumber should pull in on the subform if the user clicks on the tab to
them to Notes.

I also have a macro to pull in the text into Notes subform. But like I said
nothing is working. All I see on the subform is the boxes that should hold
the data. by the way there is NO data entry going on. This main form &
subform is for viewing only. No input going on.

I'm really at a standstill on this as I have other subforms that will need
this as well. I don't want to continue making all of these subforms until I
can get 1 working right.

Any ideas or a solution on how I can get this to work?
 
Top