Tracking tables inside tables - redrawing for each record?

T

Tuan_Jim

The title is probably a little unclear. Basically I'm putting together a
large database and I have two primary tables -- one is made up of patrol
reports, the other is a database tracking individuals/contacts.

What I want to do is have it so that on each individual contact record,
there will be a subform containing the unique id's of each patrol report that
that individual shows up on.

Following that, my goal is to have that subform cause another subform on the
same page (basically a slimmed down version of the original patrol report
table) to display in subform/table form (not too clear I guess) the relevant
patrol reports that the earlier numbers should have referred to.

End state: On each individual contact page/record, I can see at a glance
all the patrol report #'s that pertain to the individual as well as being
able to skim the reports themselves.

Current situation: In testing my current set up, I am able to enter a
patrol report unique id # in the subform I have set apart for it, and it does
in turn cause the patrol report to show up in the other subform on the same
record.

HOWEVER -- when I progress to the next contact record in the table, none of
the subforms reset themselves or display the relevant data, they just show
the entries that were made on the previous record and any new data added just
follows below the previous entries -- whether or not it is relevant to the
current individual.

Any advice on this would be greatly appreciated. I'm away from my work
computer at the moment, but could probably provide clarification tomorrow
morning (local time). As I mentioned earlier, this is the most in-depth I've
gotten in creating Access databases, but this is definitely a learning
experience.

thanks.
 
K

KARL DEWEY

The way I see it you need at least three tables.
Contacts
Reports
ContactRpts

Contacts identify the individuals.

Reports are narrative with a unique identification, datetime, route,
location, etc. The narrative would list the contacts.

ContactRpts table would contain a field for contactt ID and ReportID.
 
J

John Vinson

The title is probably a little unclear. Basically I'm putting together a
large database and I have two primary tables -- one is made up of patrol
reports, the other is a database tracking individuals/contacts.

Jargon here: in Access, a "Database" is a .mdb file, a container for
multiple Tables, Forms, Reports, Queries, and other objects. I think
you mean two *tables*.
What I want to do is have it so that on each individual contact record,
there will be a subform containing the unique id's of each patrol report that
that individual shows up on.

again... don't confuse data Storage (tables) with data Presentation
(forms). A Form is a tool, a window which lets you view data in tables
and queries. You certainly do NOT need a different Subform for each
unique ID! I would expect you need one simple Form with one or two
subforms. The main form bould be based on the Contact record; the
subform would have that person's patrol reports. This can be handled
by using the person's ID as the master/link field of the Subform
control.
Following that, my goal is to have that subform cause another subform on the
same page (basically a slimmed down version of the original patrol report
table) to display in subform/table form (not too clear I guess) the relevant
patrol reports that the earlier numbers should have referred to.

No. That's not clear at all. It sounds like two different ways of
describing the same subform - it displays the patrol reports. What's
the difference between the two? Why a "slimmed down" one showing the
same data as the fat one?
End state: On each individual contact page/record, I can see at a glance
all the patrol report #'s that pertain to the individual as well as being
able to skim the reports themselves.

Current situation: In testing my current set up, I am able to enter a
patrol report unique id # in the subform I have set apart for it, and it does
in turn cause the patrol report to show up in the other subform on the same
record.

HOWEVER -- when I progress to the next contact record in the table, none of
the subforms reset themselves or display the relevant data, they just show
the entries that were made on the previous record and any new data added just
follows below the previous entries -- whether or not it is relevant to the
current individual.

What are the Master/Child Link Field properties of the subforms? What
are their Recordsources?


John W. Vinson[MVP]
 

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

Top