Results 1 to 5 of 5

Thread: Searching (XP)

  1. #1
    2 Star Lounger
    Join Date
    Mar 2003
    Location
    Toronto, Canada
    Posts
    101
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Searching (XP)

    How do I use a form to search for an item? For example I have the fields Name, Company and City. I want to search for a specific company names? Or I would like to see all the companys a person would manage by typing that persons name in. Is that possible?

    I know i can create a query for each search item, but what is the fastest way to do this?

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Searching (XP)

    Access has several ways of searching and filtering built in:

    Edit | Find (or the Find button on the toolbar) will let you search for a value you type. You can specify whether you want to search only on the field that was active when you selected Edit | Find, or in all fields, and whether you're searching for a complete value, a partial value or the start of the value.

    There are various filtering options:
    - Click in a person's name and click the Filter by Selection button on the toolbar. The form will only display records for that person.
    - Select part of a company name and click the Filter by Selection button. The form will only display records for companies whose name contains the selected text.
    - Click in a city, then right-click and select Filter Excluding Selection. The form will display records for all cities except the one you clicked in.

    If you put a new combo box on the form with the 'Control Wizards' option on the Control Toolbox on, Access will start the Combo Box Wizard. The third option is to create a combo box to search for records. The wizard will prompt you to provide the necessary information, then create a combo box and the code needed for searching.

  3. #3
    2 Star Lounger
    Join Date
    Mar 2003
    Location
    Toronto, Canada
    Posts
    101
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Searching (XP)

    The Combo box sounds more like where i am going. I would really want to type a name in a form, and the results of a table will be displayed. When you talk coding is it heavy coding?

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Searching (XP)

    If you create the combo box through the Combo Box Wizard, you won't have to do any coding yourself.

    - Create a form based on your table; you can use a wizard or design it yourself.
    - Make sure that the Control Wizards button on the Toolbox is on (down)
    - Select the Combo Box on the Toolbox, then click on the form.
    - The Combo Box Wizard will appear, offering 3 options.
    - Select the 3rd one, then click Next.
    - Specify the field (or fields) in which you want to search, then click Next.
    - Adjust the column width if necessary, then click Next.
    - Specify a label for the combo box (preferably something instructive), then click Finish.

    The Wizard will write the code for you; if you are interested, you can view it in the Visual Basic Editor.

    Save the form, then open it in form view. Select a value from the combo box to see how it works.

  5. #5
    2 Star Lounger
    Join Date
    Mar 2003
    Location
    Toronto, Canada
    Posts
    101
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Searching (XP)

    I must not be explaining the question right. i will try to figure it out on my own. I think i will have to do some coding. I will post my results once I get there. Thanks for all your help.

Posting Permissions

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