Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Best way to handle lookup
Message
From
13/11/1997 10:58:25
 
 
To
13/11/1997 08:57:07
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00059917
Message ID:
00059942
Views:
27
>Hi, I'm new to VFP (3.0b) and am hoping you will be able to help me with some ideas on the best way (user-interface wise) to lookup an indivual in a database. I have a database of 12,000 Alumni, and users need to lookup Alumni from the database useing one of several search criteria (lname, grad date, City, ID#, Company, etc). The initial search could produce multiple individuals (ex. lname="Brown" could produce 40+ Alumni) from which I would like the user to be able to select one. I would then display full Alumni information for the selected Alumni.
> My thought was to have a listbox holding the initial search criteria (lname, grad date, City, ID#, Company, etc.) and a textbox for the user to enter (for instance) the last name. When the user clicks on a FIND button, I would search the database, fill an array with the results, and bring up another listbox based on the array. The user would make his/her final selection here.
> Does this seem like the 'right' way to do it? Any other thoughts? Thanks in advance,
>
>Dave DeHaan

Sounds sort of close to what I am doing. My member table has about 120,000. The way I let a user choose a member is with a fairly complex 'list' screen. The initial screen consists of a grid filled with, names, phone numbers, addresses, and ssns of all active records in the table, sorted by last,first names. I use the ingrid control to allow incremental search by last name. In the click of the column headers of different column, I change the sort order of the grid to that field. There is an ingrid control (this control can be found here in the files section) in each column that allows incremental search on any field in the table. In addition to these, there is a button on the form with the caption "Narrow the search..." that calls up a Stonefield's Query builder, which allows the user to choose criteria to filter on from every field in the table (or fewer, if the designer so wishes). The main form then requeries the database on the criteria specified and reindexes indexes the cursor on all the required fields. (The chosen criteria are listed in an editbox on the screen). The screen then operates just like it did before (incremental searches, reordering, etc), and allows the user to pick from there.
I even added a function to the Query builder that utilizes VFP's SOUNDEX function that allows the user to give all members with names that sound like the entered name. For example:
Last name sounds like "more" returns
Moore
Morrow
Moorer
Meyer
Moor etc.

There are any number of ways to do what you want to, I hope this gives you an idea or two. I'm confident that you'll hear some pretty slick solutions from other UT members
Erik Moore
Clientelligence
Previous
Reply
Map
View

Click here to load this message in the networking platform