Subform field linker using OR

  • Thread starter Thread starter mcheng
  • Start date Start date
M

mcheng

I've linked 2 subforms (using 6 Child Fields) to the same form (using
6 Master Fields). The links created are based on AND joins. (I.e.
show all records where Master Field A and Master Field B matches Child
Field A and Child Field B). I'm wondering if we can change the link
between the Master and Child to show OR joins, i.e. such that all
records matching Master Field A to Child Field A OR Master Field B to
Child Field B) are displayed?

Thanks,
Michael
 
Create queries with your criteria and then base your subforms off the
queries. Then do not put a Master or Child link. You may have to add a line
similar to the following to an event or button to change the data as
necessary.

[Forms]![frmFormName]![sfrmSubformName].Requery

Hope this helps.
 
I've taken out the Master/Child Link and used a query. Rather than
deciphering how to add the additional line, i've merely created tabs
based on different queries for each tab. It's not the prettiest thing
but it gets the job done... thanks

Create queries with your criteria and then base your subforms off the
queries. Then do not put a Master or Child link. You may have to add a line
similar to the following to an event or button to change the data as
necessary.

[Forms]![frmFormName]![sfrmSubformName].Requery

Hope this helps.



mcheng said:
I've linked 2 subforms (using 6 Child Fields) to the same form (using
6 Master Fields). The links created are based on AND joins. (I.e.
show all records where Master Field A and Master Field B matches Child
Field A and Child Field B). I'm wondering if we can change the link
between the Master and Child to show OR joins, i.e. such that all
records matching Master Field A to Child Field A OR Master Field B to
Child Field B) are displayed?
Thanks,
Michael- Hide quoted text -

- Show quoted text -
 
Back
Top