Subject Re: Form to Form
From Lee Grant <camilee@nospam.comcast.net>
Date Sat, 10 Jun 2023 21:45:21 -0400
Newsgroups dbase.getting-started

Peter,

Forgot to show, where in the method calling the child form, and some of
the information it had to have before opening, this is my code that
mapped the query's for the child to be able to use.

       //change any properties before launching second form triplist.wfm
       form.TLF1.prosheet1 = form.prosheet1  //prosheet rowset via query
       form.TLF1.triplistvisual = form.triplistvisual // triplist rowset
visual representation via query
       form.TLF1.triplistdata = form.triplistdata  //triplist rowset
data representation via query

In my program, the parent program had it's own grid, that was filled
with the query 'prosheet1'.
Then I also had a secondary grid, that held the information that was
linked via 'prosheet1' to my second and third query's which was
respectively 'triplistvisual' and 'triplistdata'.  I named them that way
so I wouldn't get confused which rowset I was using to display the
information on the form in the grid ('triplistvisual') and the rowset
that I was actually modifying the data ('triplistdata'), which when
appended, I could refresh the triplistvisual query and it would show my
changes in the grid.

The point of this message, is to show you what you need to do, to setup
the mechanics of the communication between your forms and the query's
that matter. Now you can use the way you've set it up, with two forms
with two query's, but you're responsible to make sure  the parent form's
query information of importance is passed in variables to the child
forms query so that it can get the same exact references.  You're not
doing that in your current forms...you're assuming the one knows what
the other does...and it doesn't because you haven't plumbed it that way.

Lee


On 6/10/2023 11:41 AM, Peter wrote:
> Peter wrote:
> As you requested I am attaching the 2 forms, an edited dbf with mdx and dbt files.  I hope all this will fit in the attachments area.
> Please excuse my using "Mervyn" for the files!  I do like the "Harry Potter" series, so the patients are obvious. All data has been made up and represent no known persons.
> Peter
<snip>