Filter Parent on Sub-Form

  • Thread starter Thread starter Guest
  • Start date Start date
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
 
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
 
Back
Top