Home

Finding the Right Access 2013 Tool for Keeping Garbage Out

|
Updated:  
2016-03-26 15:40:33
|
Access Forms and Reports For Dummies
Explore Book
Buy On Amazon

If the data that goes into your database through tables and forms is garbage, any output or analysis you do with queries and reports will give you garbage too. Fortunately, Access offers lots of tools to help you make sure that the data that goes in each field is the data that’s supposed to go in that field. You can find many of the tools that keep garbage out in Table Design view:

  • Data Type: Use the correct data type to prevent data of the wrong type from being entered.

  • Field Size: This property limits the number of characters. If you know that a field should never exceed four characters, for example, set Field Size to 4.

  • Format: This property makes the data look right. You can change text to all caps or all lowercase, for example.

  • Input Mask: An input mask limits the information allowed in a field by specifying what characters you can enter. Use an input mask when you know the form the data should take — if an order number has two letters followed by four digits, for example. Phone numbers and zip codes are other examples of fields in which input masks are useful. Input masks work with the Format field property.

  • Default Value: This property defines a value that appears by default if no other value is entered. The default value appears in the field until another value is entered.

  • Field or Record Validation Rule: Data must pass this rule before it’s entered. This property works with the Validation Text property rule.

  • Required: This property specifies that the field must have a value for you to save the record. When no value is entered, Access doesn’t create a new record when Tab or Enter is pressed, and the New Record button is grayed out.

  • Allow Zero Length: This property specifies whether a zero-length entry such as “” (quotes without a space between them) is allowed (only for Text, Long Text, and Hyperlink fields). A zero-length field allows you to differentiate between information that doesn’t exist and a null value (blank) that is unknown or hasn’t been entered. When this option is set, it allows a zero-length string in a required field. You may want to use an input mask to make a zero-length field look different from a null value when both are allowed.

  • Indexed: When you choose to index a field, you can specify that no duplicate values are allowed in the field. This property is also accessible from Datasheet view; it’s a check box on the Datasheet tab of the Ribbon.

  • Lookup Fields: This property allows the user to select a value for a field that’s stored in another field, thereby eliminating many misspellings and standardizing the options for the field. Use the Lookup Wizard to create a lookup field.

About This Article

This article is from the book: 

About the book author:

Alison Barrows is the author or coauthor of several books about Access, Windows, and the Internet. Joseph Stockman is an 18-year software designer who has authored or coauthored five Access programming books. Allen Taylor is a 30-year veteran of the computer industry and the author of over 20 books.

Joe Stockman is an independent consultant, software designer, and author who has been using Microsoft Access since its initial release. He’s also developed courseware and taught classes in Access and VBA. Joe developed his first application in Access, and then migrated into Visual Basic and VB.NET, where he specializes in creating applications for the Windows Mobile platform. He worked for several software companies before forming his consulting business in 2002, where he deals with all types of clients including healthcare, financial, government, manufacturing, and small business. His ability to turn his customers’ wishes into working applications keeps them satisfied. Joe’s also writing the fundamentals column for the Advisor Guide to Microsoft Access magazine.

Allen G. Taylor is a 30-year veteran of the computer industry and the author of over 40 books, including SQL For Dummies and Crystal Reports For Dummies. He lectures nationally on databases, innovation, and entrepreneurship. He also teaches database development internationally through a leading online education provider.