Normal Topic Searching Form with zero subform record (Read 778 times)
Bharat_Naik
Senior Member
Members
*****
Offline


Ever ready to learn and
share

Posts: 1202
Location: Chicago,  Illinois
Joined: Dec 16th, 2003
Searching Form with zero subform record
Mar 19th, 2014 at 5:11pm
Print Post Print Post  
I have a form with a subform that is naturally linked. I am trying to find records where form prepared on certain date that has no subform. If I put "=" in the first subform field and put a date in the form date element, it is not yielding any result. I know there are several records like that in there is no subform record.
Thanks.
  
Back to top
 
IP Logged
 
Carl Underwood
Senior Member
Members
*****
Offline



Posts: 1351
Location: New Hampshire
Joined: Mar 11th, 2003
Re: Searching Form with zero subform record
Reply #1 - Mar 19th, 2014 at 8:24pm
Print Post Print Post  
Other than creating a programmed retrieve...

In a quick test here, the following worked for me.

1. Enter "/=" into a subform field (one which would normally always have a value). Then, select "Inverted Search" from the command area on the left side.
2. Press F7 to get back to the search screen, and clear the specs with F3.
3. Enter the date specs on the parent form, and select "Search in Current Results" from the command area.

It does not work if you try to enter the date specs on the parent while doing step 1 above.

- Carl
  


Carl Underwood
CDU Computer Consulting LLC
Epsom, New Hampshire
Back to top
IP Logged
 
Bharat_Naik
Senior Member
Members
*****
Offline


Ever ready to learn and
share

Posts: 1202
Location: Chicago,  Illinois
Joined: Dec 16th, 2003
Re: Searching Form with zero subform record
Reply #2 - Mar 19th, 2014 at 8:59pm
Print Post Print Post  
Thanks Carl. It gave me the result that I want but I did not understand the concept. I will have to contemplate  to understand this!  I truly appreciate your help.
  
Back to top
 
IP Logged
 
Bharat_Naik
Senior Member
Members
*****
Offline


Ever ready to learn and
share

Posts: 1202
Location: Chicago,  Illinois
Joined: Dec 16th, 2003
Re: Searching Form with zero subform record
Reply #3 - Mar 19th, 2014 at 10:25pm
Print Post Print Post  
Carl, What I fail to understand that in step one, it gives the records that does not have any subform record by using inverted  search but when we use the same logic by filling the value in the main form, say the date and then retrieve the records, it does not give the desired results in just one step. It seems like the inverted search just works on one (subform here) form at a time but not on the both at the same time. Just wondering, why?
  
Back to top
 
IP Logged
 
Carl Underwood
Senior Member
Members
*****
Offline



Posts: 1351
Location: New Hampshire
Joined: Mar 11th, 2003
Re: Searching Form with zero subform record
Reply #4 - Mar 20th, 2014 at 2:25am
Print Post Print Post  
Not sure I can explain it either. I just know that it works.  Smiley
  


Carl Underwood
CDU Computer Consulting LLC
Epsom, New Hampshire
Back to top
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: Searching Form with zero subform record
Reply #5 - Mar 20th, 2014 at 1:12pm
Print Post Print Post  
It works because we have three conditions in a sub form element: blank, not blank, and non-existent. When you test for not-blank, the element must also exist.

But when you test for not not-blank (inverse search of not-blank), the element can meet two conditions: blank or non-existent. This is because Sesame does an inverse search by doing a regular search first and then returning all the records that were not found.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
Bharat_Naik
Senior Member
Members
*****
Offline


Ever ready to learn and
share

Posts: 1202
Location: Chicago,  Illinois
Joined: Dec 16th, 2003
Re: Searching Form with zero subform record
Reply #6 - Mar 20th, 2014 at 1:43pm
Print Post Print Post  
Thank Mark for explanation. I see now three conditions, record with data, empty and non-existent record. I see why Inverted search is needed to find non-existed record condition.
  
Back to top
 
IP Logged