edit hotspots Click the View drop-down arrow to switch to another view of your query. In most cases, you will only need to use two main views: Datasheet view and Design view. Datasheet view lets you view your query results in the form of a table. Design view, featured here, allows you to view and modify the design of your query. Show After you have designed your query, click the Run command to view the results of the query in a table. All of the tables you choose to include in your query will appear as small windows in the Object Relationship pane. Each window contains a list of every available field within that table. The first row of the design grid contains the names of the fields included in the query. Directly beneath each field name is the name of the table that field belongs to. The bottom part of Query Design view is called the design grid. It contains a table that lists all of the fields included in the query. Within this table, you can set criteria to specify which information the query should retrieve. You can sort the data retrieved by a query. Simply click in the Sort: row of the field you want to sort, and select either an Ascending or Descending sort. By default, query results are not sorted. You may want to include fields in the design of your query but hide them in the query results. To hide a field, uncheck the checkbox in the Show: row of that field. Entering query criteria lets you specify exactly what type of information you want your query to retrieve. Simply type the desired criteria in the Criteria: row of the field you want to search. Here, the criteria has been set so the query will search for records with Raleigh in the City field or zip code 27513. Design View can make it easier to set up a table. It provides a different view of the table to Datasheet View, and is typically used to configure the table. You can use Design View to create a tables, set up data types for each field, specify default values, specify how data should be entered and displayed, and more. Generally speaking, most tasks can be achieved using either Design View or Datasheet View, however there are some advanced settings that can only be changed in Design View. Also, you might find that you prefer to do certain tasks in Design View and other tasks in Datasheet View. We will now use Design View to do two things: So now that we've established that Design View and Datasheet View are just two ways of looking at the same table, let's go ahead and create a table in Design View. Click Table Design from the Ribbon (ensuring that the Ribbon is on the Create tab). A blank table called Table1 will be displayed in Design View. Now we will enter each field and select their data type. In the first cell under Field Name add a field called GenreId. Select Autonumber as its data type. Under that field, create a new one called Genre and select Short Text for its data type. Ensuring the Genre field is selected (by clicking on it), look at the bottom Field Properties frame. Double-click somewhere in the Required row, so that the value now reads Yes. Now, double-click in the Allow Zero Length field so that it changes to No. We have just made the Genre field a required field — all records must have a value in this field, and it can't just contain a blank string.
You can also click in the row, then use the small button with the down-arrow to change the value. Or, you can simply highlight the current value (by clicking on it) and type Yes or No over the top of it. Right-click on the GenreId field and select Primary Key from the drop down list. This makes the field a primary key field. Once you've done this, you'll see a little key icon to the left of GenreId. Right-click on the Table1 tab and select Save from the drop down list. Call the table Genres and click OK. Set the Field Properties for an Existing TableYou can also use Design View to edit any existing table. Whether the table was created in Design View or Datasheet View doesn't matter. Any table can be edited in Design View. Now we will change some field properties to the table we created previously.
Get full access to Ten Minute Guide to Access 97 and 60K+ other titles, with free 10-day trial of O'Reilly. There's also live online events, interactive content, certification prep materials, and more.
When working with tables, there are two views available: Design and Datasheet. One easy way to switch between the views by clicking the down arrow next to the View button on the toolbar (it's the leftmost button). Then select the view you want from the drop-down list that appears. Another way to switch between views is shown in the following steps:
Get Ten Minute Guide to Access 97 now with the O’Reilly learning platform. O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.
Get Mark Richards’s Software Architecture Patterns ebook to better understand how to design components—and how they should interact. It’s yours, free.Get it now |