Access 2007[c] The Missing Manual
2.1. Understanding Data Types
All data's not created equal. Consider the Dolls table you created in Chapter 1 (Section 1.2.3). Its fields actually contain several different types of information:
You may naturally assume that the PurchasePrice field always includes numeric content, and the DateAcquired field always includes something that can be interpreted as a date. But if you haven't set the data types correctly, Access doesn't share your assumptions, and doesn't follow the same rules. When you create a new field in Datasheet view, Access makes an educated guess about the data type by examining the information you've just typed in. If you type 44 , then Access assumes you're creating a number field. If you type Jan 6, 2007 , then Access recognizes a date. However, it's easy to confuse Access, which leads to the problems shown in Figure 2-1.
In order to prevent invalid entries, you need to tell Access what each field should contain. Once you set the rules, Access enforces them rigorously. You put these requirements in place using another windowthe Design view of your table. |