Filter Parent on Sub-Form

G

Guest

Hello,
To the point:
tblPermit, tblCuts
both are Parent tables in their own rite. They also have a one
(tblPermit.PermitID) to many (tblCuts.PermitID)

I need to filter where tblCuts.PermitID is not null and is equal to
tblPermit.PermitID where tblPermit is the record source form the Parent form
and tblCuts is the record source for the Child form.

This has been driving me crazy all day and has caused me to booger up my db.
Any help is greatly appreciated.
NckX
 
A

Allen Browne

If you set the LinkMasterFields and LinkChildFields properties of the
subform control to PermitID, the subform will automatically be filtered to
just the records matching the PermitID in the main form. No code needed.
Nulls and non-matches don't show.

If you are actually trying to specify some other value that is the the
subform, and filter the main form so that it contains only those permits
that have the value in their cuts, see:
Filter a Form on a Field in a Subform
at:
http://allenbrowne.com/ser-28.html
 

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