Subject |
Re: Lookuprowset |
From |
Peter <Phb2020@hotmail.com> |
Date |
Thu, 04 May 2023 16:20:09 -0400 |
Newsgroups |
dbase.getting-started |
Peter Wrote:
I have a form with a grid so the user can choose a patient to edit. After user highlights patient on grid, Pushbuttongoto then takes user to another form with all the needed data-linked entryfields (name, address, phone etc including entryfieldIns1_code) from patient.dbf. When this edit form opens I would like to show the full insurance name in entryfieldIns1_name based on the value of the field “ins_code. Later, if user wishes to change the field[“ins_code”], the function you have helped me with would change the ins_name.
Also, how do I pass the value of patient ID (a number field, called pat_no) from the pushbutton_goto form with the grid to the edit form? Does the query that shows grid data gets passed to the edit form, or do I need a second query that uses rowset.fields[“pat_no”].value to edit form?
Not sure I am explaining myself well.
Peter
Lee Grant Wrote:
> Peter,
>
> Since you don't want input, on opening the form, I would imagine you
> could just hardwire the default in onOpen, whatever that would be.
> ie:
> > form.entryfield2.value = (whatever you want)
>
> Lee
>
> On 5/4/2023 11:19 AM, Peter wrote:
> > Yes, Lee! I put ins_code in lower case and removed extra space between value and period. Works great. Always good to get second opinion with new eyes and fresh, wise ideas.
> > So my other question relates to using this “onKey” function to put the ins_name in the entryfield2 when form first opens, ie before entryfield1 gets focus.
> > I did same with duflp age() function to put patient age on the editable form in the form.onOpen(). Age() is used again as part of a validation function if date-of-birth is changed.
> > Peter
> <snip>
|
|