Modifying Access tables is simple. Use these tips to modify tables in Access to suit your database's needs.
Setting the character limit for a field sets a rule about how many characters—letters, numbers, punctuation, and even spaces—can be entered into that field. This can help to keep the data in your records concise and even force users to enter data a certain way.
In the example below, a user is entering records that include addresses. If you set the character limit in the State field to 2, users can only enter two characters of information. This means they must enter postal abbreviations for the states instead of the full name—here, NC instead of North Carolina. Note that you can only set a character limit for fields defined as text.
A validation rule is a rule that dictates which information can be entered into a field. When a validation rule is in place, it is impossible for a user to enter data that violates the rule. For example, if we were asking users to input a state name into a table with contact information, we might create a rule that limits the valid responses to U.S. state postal codes. This would prevent users from typing something that wasn't actually a real state postal code.
In the example below, we will apply this rule to our Customers table. It's a fairly simple validation rule—we'll just name all of the valid responses a user could enter, which will mean users can't type anything else into the record. However, it's possible to create validation rules that are much more complex. For detailed information on how to write validation rules, review this tutorial from Microsoft on creating validation rules.
Simple validation rules can be written exactly like query criteria. The only difference is that query criteria search for data, while an identical validation rule either permits or rejects data. To see examples of query criteria, review our Query Criteria Quick Reference Guide.