Results 1 to 2 of 2

Thread: Query That Uses Multiple Criteria in One Field

  1. #1
    Join Date
    Nov 2005
    Posts
    3

    Default Query That Uses Multiple Criteria in One Field

    Creating a query that uses multiple criteria for a field is like running a filter on your query results. For example, if you have a table that contains complete addresses of all your friends, you can run a query that will display brief information for those who live in New York, or for those who live in New York and whose surname starts with the letter "B".


    Steps:
    1. Create a query in the usual way. Using the example given above, you would include the fields "Surname" and "City". (See "How to Create a Simple Query in Microsoft Access.")

    2. From the database window, in Query view, select the query, then click on Design.

    3. The query opens in Design view. In the Surname field, click in the Criteria text box.

    4. To search for friends whose name begins with "B," enter Like "B*" in the Criteria text box. Press Enter.

    5. In the Criteria text box for the City field, enter "New York." Press Enter.

    6. Switch to Datasheet view. You will see a list of all friends living in New York whose name begins with the letter "B".

  2. #2
    Join Date
    Nov 2005
    Posts
    3

    Default

    Primary keys are unique record identifiers that MS Access uses when retrieving information for a query or a report. With primary keys, you can join tables in relationships so that you can query both of them at once. These instructions are for Access 97.


    Steps:
    1. Open a table in Design view.

    2. Click the Row Selector for each field you want to set for the primary key. The Row Selector is the small box that allows you to select an entire row.

    3. Click on the Primary Key icon in the toolbar, or select Primary Key from the Edit menu.

    4. If you've selected a field for a Primary Key that already contains data or returns a null value, MS Access will not allow you to create a primary key.

    5. If desired, you can edit the data so it's no longer duplicated.

Bookmarks

Posting Permissions

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