Restricting the Type of Data in a Field

The Data Type setting restricts entries in a field to a specific type of data, such as text, numbers, or dates. If, for example, the data type is set to Number and you attempt to enter text, Access refuses the entry and displays a warning.

The field properties you can set to control input are:

  • Required

  • Allow Zero Length

  • Field Size

  • Input Mask

  • Validation Rule

The Required and Allow Zero Length properties are fairly obvious. If the Required property is set to Yes, the field can’t be left blank. However, Access differentiates between a blank field (which it refers to as a Null field) and a field that looks blank, but contains an empty string. If Allow Zero Length is set to Yes, you can enter an empty string (two quotation ...

Get 2007 Microsoft® Office System Step by Step, Second Edition 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.