Subforms and reports

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

Guest

When using a subform on a main form, and the main form information is being pulled from a query, and the sub form data is being entered and stored in a table - how does Access link the subform data to the main form data so that reports can be written including data from all of the above?
 
jdembosky said:
When using a subform on a main form, and the main form information is being pulled from a query, and the sub form data is being entered and stored in a table - how does Access link the subform data to the main form data so that reports can be written including data from all of the above?


Take a look at the subform control's Link Master/Child
properties. The master field should be the primary key in
the main form's table and the child field should be a
foreign key in the subform's table.

You can use the same arrangement using a main report and a
subreport.

Many times, you might prefer to use Sorting and Grouping in
a main report withoutf a subreport. For this arrangement,
base the report on a query that Joins the two tables on the
same fields as used in the form's Link Master/Child
properties. This will be done automatically when you create
a new query that includes both tables, but only if you've
specified their relationship using the Relationships window.
 
Back
Top