main form to subform relationship

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

Guest

I thought that the main form data and it's subform data are all part of one
record, if so how do I configure the relationship to reflect that. When I
enter data into the main form, go to the subform and enter data, shouldn't I
be able to move to the next record and start over?
 
I do not see a reason to have a subform if both main form and subform use the
same table.

Many people use main-subform as parent-child relationship in a one-to-many
relations.

One order with many items in the order.

The forms may use the same query as record source with the two tables joined
in the query.
 
I thought that the main form data and it's subform data are all part of one
record,

Typically, no, that is NOT the case. Instead, normally the Form would
be based on the "One" side table, and the Subform on a related "many"
side table. The records shown on the subform would be those associated
with the currently selected record on the mainform, but it's a
*different* table with *different* records.
if so how do I configure the relationship to reflect that. When I
enter data into the main form, go to the subform and enter data, shouldn't I
be able to move to the next record and start over?

Yes. If this isn't happening, and you're using tables with a defined
relationship echoed in the Master/Child Link Field properties, please
post the Recordsource properties of the two forms and the Master/Child
Link Fields so we can see what might be wrong!

John W. Vinson[MVP]
 
This is an attempt to answer the Record Source Properties and Master/Child
Link Fields request in your post. I am a beginner!!!!

RECORD SOURCE – MAIN FORM: LitEvents
FIELDS: LitEventID, LitID, CycleID
RELATIONSHIPS:
LitID(Many) to LitID(1)of Liturgies Table
CycleID(Many) to CycleID(1) of Cycles Table
LitEventID to Assign1ID of Assignments1 Table and Assign2ID of Assignments2
Table

RECORD SOURCE – ASSIGNMENTS1 SUBFORM: SELECT Assignments1.LitEvent1ID,
Assignments1.Assign1ID, Assignments1.PrepID, Assignments1.PrepHymn,
Assignments1.[PrepHymn#], Assignments1.PrComID, Assignments1.PrComHymn,
Assignments1.[PrComHymn#], Assignments1.Com1ID, Assignments1.Com1Hymn,
Assignments1.[Com1Hymn#], Assignments1.Com2ID, Assignments1.Com2Hymn,
Assignments1.[Com2Hymn#], Assignments1.ClID, Assignments1.ClHymn,
Assignments1.[ClHymn#], Assignments1.InPostID, Assignments1.InPostHymn,
Assignments1.[InPostHymn#] FROM Assignments1;
FIELDS:
PrepID, PrepHymn, PrepHymn#
PrComID, PrComHymn, PrComHymn#
Com1ID, Com1Hymn, Com1Hymn#
Com2ID, Com2Hymn, Com2Hymn#
ClID, ClHymn, ClHymn#
InPostID, InPostHymn, InPostHymn#
RELATIONSHIPS: (typical)
PrepID(Many) to PrepID(1) of Preparation Table
Etc., etc…..

RECORD SOURCE – ASSIGNMENTS2 SUBFORM: SELECT Assignments2.Assign2ID,
Assignments2.LitEvent2ID, Assignments2.PrlID, Assignments2.PrlHymn,
Assignments2.[PrlHymn#], Assignments2.InProcID, Assignments2.InProcHymn,
Assignments2.[InProcHymn#], Assignments2.GathID, Assignments2.GathHymn,
Assignments2.[GathHymn#], Assignments2.RPsID, Assignments2.RPsHymn,
Assignments2.[RPsHymn#], Assignments2.GAID, Assignments2.GAHymn
FIELDS:
PrlID, PrlHymn, PrlHymn#
InProcID, InProcHymn, InProcHymn#
GathID, GathHymn, GathHymn#
RPsID, RPsHymn, RPsHymn#
GAID, GAHymn, GAHymn#
RELATIONSHIPS: (typical)
PrlID(Many) to PrlID(1) of Prelude Table

The LitEvents MAIN FORM has 2 fields: LITURGIES and CYCLE
The data fields in the two SUBFORMS relate to those two fields in the MAIN
FORM, all making up a complete record. I hope this answers your request.
Thanx for responding.
 

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

Back
Top