Subject |
Re: Form to Form |
From |
Lee Grant <camilee@nospam.comcast.net> |
Date |
Sun, 11 Jun 2023 04:10:13 -0400 |
Newsgroups |
dbase.getting-started |
Peter,
Might I suggest, that if you're going to go with a query on each form
separate, then maybe you need to use a variable created on_Open for the
first form, that will hold the chosen variable via your grid form, which
can then be accessed by your second form query, to use to select from
that query....if this is the way you want to go.
The way I did my forms, was to make the first form the dominant, and it
allowed the child the access the query on that first form when it opened
the second by putting the results of the query from the first form, into
the entryfields of the child form in the datalink for those entryfields.
You seem to be trying to use the first form as a selection process, and
then use that to find the right record in the second form via a
completely new query.
If you understand what I'm saying, try to think how to plumb the code to
make this happen. Doing it your way, I'd use the on_Open() event in the
Gridmervyn.wfm and create at least a property _app.cpat_no, so when the
the grid selection is made, the selection from that pat_no is copied
into that _app.cpat_no. When you open the form Editpatmervyn.wfm, have
it's on_Open() event method check the _app.cpat_no to retrieve that
number to use to find and select to fill the form's fields with the
appropriate datalinks in from that query rowset.
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
|
|