Normal Topic ReleaseResultSet(Form)? (Read 4679 times)
actiontech
Full Member
***
Offline



Posts: 173
Joined: Apr 10th, 2016
ReleaseResultSet(Form)?
Mar 28th, 2018 at 9:08pm
Print Post Print Post  
Hello, I'm using FormResultSetCurrentPosition to force a subform to select a certain record. However when I don't want the subform to select a record, I would like to release the result set and for the subform to essentially go back to Search Mode, so the fields in that subform will be blank. Is there a way to do this after you've already used FormResultSetCurrentPosition in your programming?
  
Back to top
 
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2480
Joined: Aug 20th, 2003
Re: ReleaseResultSet(Form)?
Reply #1 - Mar 29th, 2018 at 1:37pm
Print Post Print Post  
That's not how subforms work. When you retrieve a parent record, you also retrieve all of it's subrecords. FormResultSetCurrentPosition() just tells Sesame which of the retrieved child records you want to have displayed(Form View) or selected(Table view).

If you want to blank out the subform, you either need to delete all the child records, clear the child records, create a new child record so you're looking at a blank subform, or unlink the child records and reload the parent record.

-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged
 
actiontech
Full Member
***
Offline



Posts: 173
Joined: Apr 10th, 2016
Re: ReleaseResultSet(Form)?
Reply #2 - Mar 29th, 2018 at 1:52pm
Print Post Print Post  
Alright, thanks.
  
Back to top
 
IP Logged