Filter form based on field from second table

S

steverossiter

I am sure this is a basic question but being a beginner I have not
found the right solution.

I have a Journalist database with one form based on tblJournalist that
contains a picture of the journalists and another form pulling data
from tblArticles that contains examples of their written work. I would
like to design the first form such that when I click on the photo field
for the journalist the second form loads and displays only their
respective writing examples.

I am able to open the second form with a click but have not figured out
how to filter all the writing examples to only the author whose photo I
clicked on.

The two tables share a JournalistID field and a one-to-many
relationship of one Journalist able to have many Articles.

This all on Access 2002 SP3 on XP Pro SP2.

Thanks for the help, Steve
 
G

Gijs Beukenoot

From (e-mail address removed) :
I am sure this is a basic question but being a beginner I have not
found the right solution.

I have a Journalist database with one form based on tblJournalist that
contains a picture of the journalists and another form pulling data
from tblArticles that contains examples of their written work. I would
like to design the first form such that when I click on the photo field
for the journalist the second form loads and displays only their
respective writing examples.

I am able to open the second form with a click but have not figured out
how to filter all the writing examples to only the author whose photo I
clicked on.

The two tables share a JournalistID field and a one-to-many
relationship of one Journalist able to have many Articles.

This all on Access 2002 SP3 on XP Pro SP2.

Thanks for the help, Steve

You can open the second form with a filter-condition. Something like
(adjust to correct fieldnames):
docmd.openform, "frmArticles",,,"fldJournalistID = " &
Me.fldJournalistID
or, if the ID is alphanumeric:
docmd.openform, "frmArticles",,,"fldJournalistID = '" &
Me.fldJournalistID & "'"
 

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