SubForm/Links

  • Thread starter Thread starter S Jackson
  • Start date Start date
S

S Jackson

I have a primary table called tblCaseInfo. The primary key in this table is
a text field called DHSNo. There is also a number field called WitnessId.

I have second table called tblWitnesses. The primary key in this table is
an autonumber field called WitnessId.

I have a form (frmMaster) that is built from a query (qryOpenCases) that
includes all of the fields from tblCaseInfo.

I want to insert a subform into frmMaster using tblWitnesses.

The relationship is one tblCaseInfo.WitnessID, to many
tblWitnesses.WitnessId.

When I add the subform the wizard defines the fields linked as follows:
Show tblWitnesses for each record in qryOpenCases using WitnessId.

I get this error when attempting to add a record to the subform:

You can't assign a value to this object.
The object may be a control on a read-only form.
the object may be on a form that is open in Design view.
The value may be too large for this field.

What silly thing am I doing wrong this time? (heavy sigh)

TIA, S. Jackson
 
I found the solution.

I needed a bridging table, with two key fields, DHSNo and WitnessId. I did
not need the WitnessId field in tblCaseInfo.
 
Back
Top