Appendix A. Field Properties

This appendix expands on some of the concepts you've learned in this book as you were creating the tables and fields. In several examples in the book, you need to set specific field properties to control the type of data that could go into the field. Therewere also times that specific field properties were required in order to support relationships between the tables.

Rather than leave you to learn from experience, in this appendix we explore field properties in detail so you can learn to use them to your advantage.

Using Field Properties

You have seen summaries of field properties in some chapters. Now, we'll examine field properties inmore detail. Properties available for a field depend, in part, on the data type assigned to values in that field. Therefore, we'll have to look at several different fields in order to cover all of the properties you can set. We'll start with one of the simpler ones to configure—the AutoNumber.

Access generates a new, unique value for an AutoNumber field each time a new record is started in a table. As soon as a record is started, Access records that AutoNumber value as "used" and cannot reuse it, even if the record is not saved. When a record is deleted, Access abandons the value of the AutoNumber in that record and cannot reuse it. This makes the AutoNumber an excellent choice for surrogate primary keys.

Take a look at the field properties for an AutoNumber field, shown in Figure A-1.

Figure A-1. Field properties for an AutoNumber ...

Get Microsoft® Access® Small Business Solutions: State-of-the-Art Database Models for Sales, Marketing, Customer Management, and More Key Business Activities now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.