Subject |
Re: Form to Form |
From |
Peter <phb2020@hotmail.com> |
Date |
Sat, 10 Jun 2023 11:41:39 -0400 |
Newsgroups |
dbase.getting-started |
Attachment(s) |
patientMervyn.dbf, patientMervyn.MDX, patientMervyn.DBT, gridMervyn.wfm, editpatmervyn.wfm |
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
Mervyn Bick Wrote:
> On 2023/06/09 20:23, Peter wrote:
> > Peter wrote:
> >
> > Thank you for these wfm\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'s. I was not able to create the tablename as you wrote. Rather than debugging, I copied and pasted into my wfm, changing names as needed, at least until there were no errors that popped up.
> > The problem is that, for some reason, the findkey() does not move the rowset to the selected pat_no in the editpattest.wfm, that was instantiated earlier.
> >
> > I am copying the PBGOEDIT_onClick with some msgbox() results.
> > I hope you can help solve this problem.
> > With thanks,
> > Peter
> >
> > function PBGOEDIT_onClick
> > private cpat_no,clname
> > store \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" to cpat_no,clname
> > //patient1 is name of main program query
> > cpat_no = form.patient1.rowset.fields[\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"pat_no\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"].value
> > msgbox(\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"cpat_no: \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"+cpat_no) //this shows CORRECT pat_no
> > //query1 is name of editpattest program query
> > form.editpattest.query1.rowset.findkey(cpat_no)
> > form.editpattest.query1.requery() //this made no difference
> > clname = form.editpattest.query1.rowset.fields[\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"lname\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"].value
> > msgbox(\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"clname: \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"+clname) // this shows Last Name of rowset.first()
> > //there is no change in rowset in \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"findkey(cpat_no)\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" above
> > form.editpattest.mdi = false
> > form.editpattest.readmodal()
> > return
>
>
> Debugging a form without being able to run it becomes nothing more than
> a guessing game. :-( My best guess at the moment is that you haven\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'t
> set an index for the rowset in your editpattest form. The index needs
> to be on the pat_no field.
>
> Mervyn.
>
|
|