Subforms and reporting

  • 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?
 
Ploughing through that marathon sentence :) I see a misconception. Reports
aren't based on forms, they are based on tables or queries.

Subforms are linked to Main forms using the Properties button and going to
the Data tab. In the Link Child Fields, the field in the subform is put that
has the same data as the field in the Main form (which is in the Link Master
Field). The wizard will do this automatically most of the time but if it
doesn't, or if you want a more complex link, then you can do it yourself.

You can have an identical looking report with a subreport by copying the
structure of your form ie

Base the main report on the same query as the one on which the main form is
built by clicking on that query and going to Insert, Report. Open this
report in design view. Drag the table (the one on which you based your
subform) from the database window onto the Details section of the report.
The wizard will spot those fields in the subreport which have the same names
as fields in the Main report. Choose the field which you want to link by. If
the fields have the same data but different names then type in the names in
the Properties box.

Write back if you get stuck.

Evi

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?
 
Back
Top