Search detail-field owned by master

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
jannes
Posts: 100
Joined: Tue Jul 02, 2019 12:22 pm

Search detail-field owned by master

Post by jannes »

Master has many detail-records.
How to search if master owns 1 ore more detail-fields ?

For instance :
I want to search (via combobox) all parents which have a child named "John".

It's about searching, not entering new records or editing fields.
The query is using a form via "Use form" : Form = Search.

A combobox or multiselect on this search-form does not display the lookup-data.

= Jannes
BLOMASKY
Posts: 1470
Joined: Wed Sep 30, 2015 10:08 pm
Location: Ocala FL

Re: Search detail-field owned by master

Post by BLOMASKY »

You have a few choices, depending on performance required and the # of records in both tables.

1). Create a field in your master table called NumberDetails and update it whenever creating or deleting child records. Then your query will have a "Where Master.numberDetails > 0

2) Write your query as follows: FIND Master WHERE Exists Details WHERE (Details.ob_master = Master).

Bruce
Post Reply