Trying to link fields btwn reports

  • Thread starter Thread starter Jake
  • Start date Start date
J

Jake

Here's the situation:
I am trying to link a subreport to a main report. The
main report has fields for Report ID, Section, Township
and Range. All are numbers except Section which is text
(SW24, for example).
The subreport is based on a qry that links this location
and report with herbicide data for that area. When I view
only the subreport the data is there, but when I view the
main report (with the subform in it) I don't see
anything.
If I remove the link with Section so that the Link Child
and Link Master fields are: Report ID;Township;Range the
data appears correctly. However, I obviously cannot leave
it this way.

I guess my main question is whether or not using text
fields to link reports and subreports is allowed or not
and, if so, what am I doing wrong?
 
You can link with any combination of fields. I would create a query with the
record sources from both reports. Create join lines between the four fields
and see if you return records.
 
I can create joins between the fields and return records
with no problem.
In point of fact, the data that I am trying to display is
broken up between 3 tables that are all joined to the
table whose sctn, township and range I am trying to
display.
 
Did you create a query with all three tables and see if records are
displayed? What are the values in your Link Master and Link Child
properties?
 
I can create queries for specific locations and have no
problem getting the data from the related tables.

If I view only the subform that that I am using in form
view, I get data. It's only when I try to view the main
form that the data dissappears.

Right now the settings are:
Link Child: Report ID;Section;Township;Range
Link Master: Report ID;Section;Township;Range

If I take out Section I get data but records don't match
up correctly.

If it helps here's a full description of the structure:
Location:
Pkey: Report ID, Section, Township, Range

CoordHerbcide:
Fkey: Report ID, Section, Township, Range (from Location)

Herbicide
Fkey: Report ID, Section, Township, Range (from
CoordHerbicide)

Additive
Fkey: Report ID, Section, Township, Range (from
CoordHerbicide)

Carrier
Fkey: Report ID, Section, Township, Range (from
CoordHerbicide)

I am using Location as the source for the main report and
trying to use a query getting related data from
CoordHerbcide, Herbicide, Additive and Carrier to get the
application data for the subreport.
 
Are we talking forms, reports, or both? One thing I would suggest (it may be
to late for your app) is to create a single field primary key for all of
your linking/joining. This saves all of this hassle and storage of redundant
data.

If you have similar link properties on forms, do they work?

Another thought would be that possibly the field name Section was causing an
issue since reports have sections.
 
Back
Top