One of the most powerful tools in database development, Microsoft Access or otherwise is validation rules. For the uninitiated, validation rules allow you to set up what data can be entered into specific fields. For example, in a date of birth field you would only want a date entered, so you would set validation rules to only accept dates. On top of that, you could also set an acceptable date range, a vast, vast majority of people will never make it past 110, so you'd make sure no one could set it to older than that.
There are many possible uses of validation rules, you can use them to reduce the amount of characters a field gets, reducing the overall size of the database, this would also help stop people from abusing the system by putting excessive amounts of characters in a field. Over all, without validation rules the data integrity of a database can be destroyed by accident or purposely very quickly.
To create validation rules in MS Access is very easy, here's how to force a field to only accept 8 characters. Enter the following string without the outside quotation marks “Is Null OR Like "????????"” in the Validation Rule section as circled below.
There are many possible uses of validation rules, you can use them to reduce the amount of characters a field gets, reducing the overall size of the database, this would also help stop people from abusing the system by putting excessive amounts of characters in a field. Over all, without validation rules the data integrity of a database can be destroyed by accident or purposely very quickly.
To create validation rules in MS Access is very easy, here's how to force a field to only accept 8 characters. Enter the following string without the outside quotation marks “Is Null OR Like "????????"” in the Validation Rule section as circled below.