Subject Lookuprowset
From Peter <Phb2020@hotmail.com>
Date Sun, 30 Apr 2023 16:11:39 -0400
Newsgroups dbase.getting-started

Frustration abounds in changing to my dBase 11 from XDML in dBase IV  and Visual dBase 7.01.  Goes back to early 1990’s when I started.
I was used to lookup(). What I’m trying to do is lookup the value of a field (ins_name) in ins_info.dbf indexed on ins_code.
The ins_code Is a 2 character field, and ins_name is the full name of an insurance company. For instance, “UH” is the ins_code for “United Healthcare”, or “MC” for “Medicare” etc.
The main form has an entryfield for the user to enter the 2 letter code. I have validated existence of that 2 letter code. No eof() to worry about. The next field (EFIns1Name) is the full name of the Insurance Company, which cannot get focus, but I want a “lookup” of the ins_code in the ins_info.dbf to return the value of the ins_name and put that value as the full Insurance company name in that second entryfield (EFIns1Name)
Most examples in these news groups are too complicated for me to adapt. So some specific code would be appreciated.
I’ve been struggling with Lookuprowset and lookupsql to no avail.
Thanks in advance for your help.
Peter