Results 1 to 2 of 2

Thread: Search

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Oct 2000
    Location
    Arkansas
    Posts
    28
    How do I create a search routine? ? ?

    What I want to be able to do is have a text box that you can type an employee's name in to (possibly have it autofill as they type the name) and when it finds a match in the text box (lost_focus) it will insert the employee's full information into the rest of the form.

  2. #2
    Addicted Member P.S.W.'s Avatar
    Join Date
    Aug 2000
    Posts
    146
    Well, I can't figure out all the code for you, but to get you started, you can look at the Forms 2.0 ComboBox as an entry device for the person's name. I suggest using the Forms 2.0 version because it has an "automatch" feature that will fill-in the name as you type.

    I assume you're linking to a database which has all the records, so you just need to link up the ComboBox to your recordset (through the .DataSource or by populating it manually), and you're halfway there (You can set the .MatchRequired property to True to recognize only names in the list).

    To insert in the rest of the info, you can either build a SQL statement that uses the entered name as a WHERE parameter, or, look up the .Find method in the VB Help and use that to move to the appropriate record.


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