Subject Re: Lookuprowset
From Lee Grant <camilee@nospam.comcast.net>
Date Fri, 5 May 2023 02:04:01 -0400
Newsgroups dbase.getting-started

Peter,

Along these lines, if you have Ken's books, "The dBASE Book", Third
Edition, Volume 1, Chapter 13 "Designing The User Interface", page 272
"Communicating Between Forms" is something you might want to read to
take some inspiration from.  Ken's books are invaluable when trying to
figure out how to do something.

Lee

On 5/5/2023 12:38 AM, Lee Grant wrote:
> Peter,
>
> It depends on how you have it set up. Grid patient gets selected, you
> obviously have a form that gets called on the click, and you have a
> method that executes calling that form. Now it needs to occupy the
> fields with the information from the rowset into that form and the work
> is accomplished with in that method or functions needed. When that data
> is put in that form, it should trigger that lookup and fill whatever
> entryfield you assign it to represent in that form.
>
> You asked how to do it when the user hasn't supplied any information,
> but by selecting that patient, with the information needed to select an
> insurance company, you  have the information you need so the user has
> selected something.
>
> As the programmer, it's now up to you to put it where it needs to go, to
> do any lookup needed when that information is supplied, and then fill
> the necessary fields of the additional form with that information.
>
> The grid information is based on a rowset, not the grid itself. It's
> just represented graphically, by a grid.
>
> Lee
>
> On 5/4/2023 4:20 PM, Peter wrote:
>> 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
>>
> <snip>