I am having problems excluding records when conducting a search on related records, the problem only seems to exist where there is more than one related record.
The client is a Hotel chain. I have two tables, Names and Stays. The Names table contains Name records, each of which has a unique name_id. The stay table contains hotel stay records, each of which has a unique stay record, and each stay record also has a name_id field. The Names table is linked to the Stay table by the name_id. This a one to many relationship, i.e. each name record could have one or more associated stay reocrds.
I have a form that displays all the fields for the Name record and a portal showing all the associated stay records. One of the stay fields ‘market_code’ is a text field, and has a three character code in each record.
If I search for all Name records with ‘LEI’ in the portal field market_code, I get the correct result, i.e. all the Name records that have LEI in the market_code in any of the related stay records.
If however, I try and search for all Name records that don’t have LEI in the market_code (!LEI), my result file includes those Name records that do have LEI in the market_code if there is more related .
How do I exclude these records! Am I doing something wrong. I am using the Find on the Menu bar.