Working with Access Tables A Continuation This document provides basic techniques for working with tables in Microsoft Access by setting field properties, creating reference tables, sorting and filtering data, and using the find/replace feature. Setting Field Properties When fields are created in the table, there are a number of properties that can be set to better streamline the data entry process. Field properties are set in Design View. 1. Properties for each field can be adjusted in the Field Properties area. a. Check the field size for appropriate length. For best performance, set it for the smallest sufficient size. Fields with a number data type have a dropdown list of specified sizes from which to choose. Information Technology Services, UIS 1
b. The Format property allows you to customize the way the field appears by default. This is especially useful for numbers and dates. c. The Input Mask displays characters to aid in data entry, like adding dashes in a SSN or parentheses in a phone number. A short wizard walks you through the process. d. The Caption is the label that is used on forms, queries, and reports. If left blank, the field name is used. e. Default value automatically assigns a specified value when a new record is added. This can be helpful for data entry of fields that typically have the same value, like making the default value of state IL. f. Validation rules can be set in order to add or change the value of the field. For example, you could set a validation rule on hourly wage to be greater than $7.49. g. The validation text is the message that appears when the validation rule is broken. Information Technology Services, UIS 2
h. Required is set to No by default. If changed to Yes, you will not be able to save a record if that field is left blank. i. Setting a field to Index speeds up read access, so that functions like sorting and filtering are faster. However, indexes cause other operations (like append and delete) to take longer. j. Smart tags label data as a particular type, and as such, can associate an action with that tag. k. Text format is available for memo fields only. It allows the data to be stored as HTML and permits rich formatting. l. Show date picker is available for date/time fields only. It shows a calendar control from which users can select a date. Please note that it is not available if an input mask is used. 2. The Lookup tab provides additional opportunities to aid in data entry. For example, if one of the fields is Department, you might create a reference table that lists each department. Then you can reference that table as a Lookup table so that the Information Technology Services, UIS 3
Departments can be chosen from a dropdown list. Working with Data Once data is entered into a table, Access provides a host of options to aid in working with the data. 1. Records can be sorted. a. Click in the field by which you want to sort and then, on the Home tab, click the Sort Ascending or Sort Descending button. b. Or click the dropdown arrow next to the field title and choose the sort order. c. To sort by multiple levels, on the Home tab, click the Advanced button and then click Advanced Filter/Sort. Information Technology Services, UIS 4
Arrange the sort order in the grid. This table will first be sorted by Job Title, and then by Last Name within each Job Title. 3. There is a Filter by Selection utility that is helpful for quickly finding records with common values. a. Select the value that you want to filter and click the Selection button on the Home tab. b. Click the Advanced button and click Clear All Filters to see all the records. Information Technology Services, UIS 5
4. Access 2007 comes with enhanced filtering options. a. Simply click on the dropdown arrow next to the field name to select multiple values by which to filter. b. You can also customize the filter by using the parameters under Text, Number, or Date Filters (based on the data type). 5. The Find button can also be helpful for finding particular records. a. Click in the field that you want to search. b. Click the Find button on the Home tab. Information Technology Services, UIS 6
c. Enter the value for which you are searching and click Find Next. Continue clicking the Find Next button until you come to the desired record. d. This utility also includes a Replace feature that allows you to find a particular value and replace it with another value. For example, if an employee changes her name, you can use the Find/Replace feature to quickly update every instance of her name in the entire table. Information Technology Services, UIS 7