Click to See Complete Forum and Search --> : Browse Window


January 20th, 2000, 09:02 AM
Greetings.

Within my data entry screen, I have included a Lookup button, which works as follows: When the user presses it, a sub-screen displays, which allows the user to enter either the SSN or Last Name of the person whose record they are trying to look up. So, for instance, if the user enters an SSN, then the program uses that SSN to find the correct record and then automatically display it on the data entry screen.

My question is this: suppose the user enters a Last Name, say, SMITH, in which there will likely be a NUMBER of matching records. In this case, I will need to display all such matching records in a window, like this,

Smith James 234-56-7890
Smith Kathy 132-45-7685
Smith Vicki 654-76-7685
. . . .
. . . .
. . . .

to allow the user to browse them and select the correct one. How do I do this?

Then, once the user selects the correct record, I need a way to save, say, the SSN of that selected record so that the program will know which record to display in the data entry screen. How do I do this?

I hope that was clear. Thanks!

Perry Neal
April 5th, 2000, 08:38 AM
You could check the record count of the return and if it's more than one Redim a multi-dimensional array to hold the last name, first name, and SSN's. These could then be used to populate a list box. The user could then select one of the names and you could use the selected item's listindex to take that value from the multi-dimensional array and populate the appropriate field(s) on your data entry screen.

Hope that helps some.