Subform field linker using OR

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
 
G

Guest

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.
 
M

mcheng

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 -
 

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