Subject |
Re: PASSING PARAMETER |
From |
Mustansir Ghor <mustan31@hotmail.com> |
Date |
Thu, 23 Feb 2017 01:36:03 -0500 |
Newsgroups |
dbase.getting-started |
Thank you Ken Sir
You are a great help to beginners like us.
Best Regards
Mustansir
Ken Mayer Wrote:
> On 2/22/2017 10:00 AM, Mustansir Ghor wrote:
> > Hello everyone
> >
> > I had learned in Tutorial to find Name in the grid using seeker. However it was tabbox so that record in rowset position remained same between the tab pages.
> >
> > But now I wish to open an another form to find the name using seeker and grid and then close it after finding the name. When I return to original form it should remain to the same record that I selected in the finding the name form.
> >
> > Please anybody can guide me best way to do the above thing.
>
> You would need to work with the concept of a "child form". Assuming you
> use a pushbutton to open the child form. Note -- this is completely
> untested:
>
> function FindButton_onClick() // whatever this is named
> set procedure to FindItForm.wfm // whatever this is named
> local f
> f = new FindItFormForm() // whatever ...
> f.mdi := false
> f.readModal()
> // at this point the child form needs to be closed
> // for other code to execute, because it was opened
> // modal
>
> // get the primary key or other value from the table
> // used in the child form, which should still be pointing
> // to the record found by the user:
> nPrimary = f.rowset.fields["name_of_primary"].value
>
> // using the primary key, you can find the record
> // in the parent form (this assumes the index is set
> // to the primary key, if not you may want to use
> // the rowset's applyLocate() instead:
> form.rowset.findKey( nPrimary )
>
> // cleanup
> release object f
> f = null
> close procedure FindItForm.wfm
> return
>
> --
> *Ken Mayer*
> Ken's dBASE Page: http://www.goldenstag.net/dbase
> The dUFLP: http://www.goldenstag.net/dbase/index.htm#duflp
> dBASE Books: http://www.goldenstag.net/dbase/Books/dBASEBooks.htm
|
|