Results 1 to 5 of 5

Thread: How would you do this...

  1. #1

    Thread Starter
    Addicted Member smh's Avatar
    Join Date
    Oct 2000
    Location
    South Dakota, USA
    Posts
    249

    Question

    I have had a request for my program to do an auto-search throught the database while they are typing in a number in a textbox to pull up the corresponding record. I am using Access 97 as my database. Does anyone have an example code for this or a site where I could view some?

    smh
    Normal is boring...

    smh

  2. #2
    Hyperactive Member
    Join Date
    Nov 2000
    Location
    Mexico City
    Posts
    306

    Wink

    In that case I use the change event. Fill a recordset and display it when the user types something. One comment: If the table you´re using is too large, this could be very slow, so you have to evaluate the impact on your performance.

  3. #3

    Thread Starter
    Addicted Member smh's Avatar
    Join Date
    Oct 2000
    Location
    South Dakota, USA
    Posts
    249

    Example?

    Do you have an example code which I could see?

    smh
    Normal is boring...

    smh

  4. #4
    _______ HeSaidJoe's Avatar
    Join Date
    Jun 1999
    Location
    Canada
    Posts
    3,946

    <?>

    Textbox...I don't know about that one.

    I use a dbComboBox, style2, matchededit = true.
    As you type in the dbCombo/Textbox the corresponding item is moved to the top of the list. Click on the item and the record can be shown either by code or dbTextboxes.
    "A myth is not the succession of individual images,
    but an integerated meaningful entity,
    reflecting a distinct aspect of the real world."

    ___ Adolf Jensen

  5. #5

    Thread Starter
    Addicted Member smh's Avatar
    Join Date
    Oct 2000
    Location
    South Dakota, USA
    Posts
    249

    Problem

    I'm having a few small problems.

    1. I don't have a matchededit property listed. I am using version 6.0 so maybe there's differneces in our versions. I do have a matchedentry property, so I will assume that is the same.

    2. In my program, when the form pulls up, it is already displaying a record from the database. I want the user to have the option to scroll through the records, or type in the record number and go directly to a specific record. Therefore, I think I need to use option 0 - dbcDropdownCombo.

    3. I have the combo box filled with information, but I am unsure how to code it so that it changes the record to display the record which I am searching for. I tryed using an SQL statement to pull the record matching the contents of the dbComboBox, but I don't know where to go from there.

    Sorry for taking up so much time. Thanks

    smh
    Normal is boring...

    smh

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