Results 1 to 5 of 5
  1. #1
    Lorne is offline Novice
    Windows Vista Access 2002
    Join Date
    Dec 2011
    Posts
    2

    Simple Dynamic Client Search

    Hi all,



    I am a business analyst who has been asked to build a database for a relatively small company. They do all of their data entry and reports on Excel, which has led to lots of double-triple entries and deleted formulas, etc. The company uses Access 2002 (yes, I know it is 2011, but they have not yet updated to the new Office, but will be within months)

    Anyways, I have most of it built but am now in the process of making it more user friendly. While I am pretty comfortable with most Access functions, I am a novice when it comes to VBA code. I want to simplify the search process for finding a client. I have several tables, and the search field at the top of the form would be a client's information table that the user would search for, copy the Social Insurance # (Canadian version of Social Secuity #) and paste it in a field below.

    I have been using a subform at the top of the form for the search field and provided instructions to either use [Ctrl][F] to find the record, or filter. I know there is a way to have it so that if the user starts typing the client's last name it will narrow down the records. I have been on several forums, tried a few of the suggestions, and I can't seem to get them to work.

    If anyone has any advice it would be greatly appreciated!

  2. #2
    Rainlover's Avatar
    Rainlover is offline Expert
    Windows 7 64bit Access 2003
    Join Date
    Nov 2009
    Location
    Queensland Australia
    Posts
    691
    In 2002 there is a simple wizard that adds a search Combo Bow to a Form, if that is what you need.

    You have explained what you have done which is good but you havn't exxplained what method you want to employ that would suit your situation.

    Or did I miss something.

  3. #3
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,725
    Lorne,

    Here is a sample mdb. I t shows how, when searching for a lastname, each character entered in a textbox, causes the On Change event to fire. This in turn causes the data for the listbox to be re-queried (based on the characters entered so far). Tis basically reduces the Lastnames in the listbox.

    It's in 2000 format so you should be able to read it.

    Check the form design and the code behind the textbox and listbox.

    Good luck.

  4. #4
    Lorne is offline Novice
    Windows Vista Access 2002
    Join Date
    Dec 2011
    Posts
    2
    Rainlover & Orange, thank you so much for your quick responses!

    Orange, your attachment was very helpful. I finally have a simple way to search through records on a form. My employer will be pleased.

  5. #5
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,725
    You are welcome, glad to help.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Creating a dynamic search box in Access 2010
    By bob500000 in forum Access
    Replies: 1
    Last Post: 11-24-2011, 02:27 PM
  2. Dynamic Form, Dynamic labels/ captions?
    By JFo in forum Programming
    Replies: 15
    Last Post: 10-12-2011, 08:33 PM
  3. Replies: 1
    Last Post: 07-26-2011, 06:10 AM
  4. Simple Search form
    By Juliano in forum Forms
    Replies: 2
    Last Post: 11-25-2010, 12:38 AM
  5. Simple list/combo search fails
    By Dega in forum Forms
    Replies: 4
    Last Post: 02-08-2010, 08:39 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums