Lost with form/subform

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

Guest

Hi;
I sure could use a hand... I have a 2000form that captures info on
employees travel (where, when, etc). I've added a subform to capture what
reports they've written. The master/child link is the employees name.

The trouble for me is that when I add info to the subform, it adds the
data to all the records with the employees name, instead of only the
particular trip.

The goal is to query who wrote what reports on what trip.

Thanks in advance

Matt P.
 
Matt,

I think there is a problem with the design of the data structure. Can a
person submit more than one report for any given trip? And can more
than one employee participate in any given trip? If so, your Reports
table needs to have a field which is a foreign key to the primary key of
the table where you record the trip participation. And then, the
form/subform structure needs to reflect this, in other words Employee's
name is not correct for the linking field. In fact, probably best to
use some sort of ID field to identify the Employee anyway, because it is
possible for two employees to have the same name. Maybe your tables
need to be set up like this...

Table: Employees
EmployeeID
EmployeeName
Address
.... other employee-specific data

Table: Trips
TripID
DateOfTrip
Destination
Purpose
.... other trip-specific data

Table: Participation
ParticipationID
EmployeeID
TripID
.... other participation-specific data

Table: TripReports
ReportID
ParticipationID
ReportTitle
DateSubmitted
.... other report-specific data

However, if an employee will only ever submit one report on any given
trip, the TripReports table is not correct, and the Report data is
included in the Participation table.
 
Back
Top