CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: Browse Window

  1. #1
    Guest

    Browse Window

    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!



  2. #2
    Join Date
    Feb 2000
    Location
    Virginia, USA
    Posts
    9

    Re: Browse Window

    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.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured