Previous article Next article
Access articles
Data validation in MS Access
Mon 23rd February 2009
Amongst the many topics that will be covered by a Microsoft Access training course, one of the key subjects will be data validation. Validating data in MS Access allows you to check data whilst it is being entered by the database operator and will prohibit the data from being saved if it breaks any validation rules or routines.
Errors and omissions easily occur when data is being entered by a user, so the need to check the data when it is being entered is important. Allowing invalid data to be entered into a database ensures that the database and the data available will become less valuable or corrupt, and it will be more difficult for the user to make use of.
The two most important types of data validation are:
Field level validation
Field level validation allows for data validation in an individual field. MS Access will not allow you to store the incorrect type of data in a field if the data type is not appropriate for the field's pre-defined/ built-in data type.
For example: a field that needs to be filled that refers to 'Name' could have the following validations: it should not be left blank; it should exclude numbers or other special characters; it should have a maximum length. These validations are performed to ensure that incorrect information is not accepted by the database.
You would choose field level validation when:
- You require a specific type of information to be entered into a field
- You want to validate the data entered into a specific field independently of any other data in the database.
Record level validation
Data is validated from more than one field with reference to each other so as to ensure correct data input. An example in an 'employee details' database would be where the retirement date of an employee cannot be the same as the start date, or in another database where a value in a field is always greater than another in the same record.
You would choose record level validation when:
- You want to limit or control the type of data a user can enter in a database or record
- You want to compare the values of two or more fields in the same database or record to ensure they comply with the rules for the database
Microsoft Access provides several methods of how to check the data being entered, two of which are the ValidationRule property and the Required property.
ValidationRule property
This can be used to specify requirements for data entered into a record or a field. If data entered violates the validation rule a specific message, set by using the validation text property, can be displayed to let the user know of the incorrect entry. If the validation text option is not selected a standard error message will be displayed.
Required property
This function can be used to specify whether a value is required in a field, thereby ensuring that the field to be filled in is not left empty. MS Access will display an error message when a required field is left blank or data is removed from a field where data should be entered.
Author is a freelance copywriter. For more information on ms access training, please visit https://www.stl-training.co.uk
Original article appears here:
https://www.stl-training.co.uk/article-419-ms-access-training.html
Back to article list
Distribution notes
London's widest choice in
dates, venues, and prices
Public Schedule:
Buy now / Live dates
On-site / Closed company:
Get quote
Testimonials
Positive Equality Charity Project Analyst/Mgr Nicola Myers PowerPoint Intermediate Advanced
The course is very good, well organised with good useful content.
The Royal Society Scheme Manager Ben Cunningham Excel Intermediate
Course was great thank you. Very helpful, managed pace well and taught new techniques, exactly what we needed.
Thanks
ABC International Bank Plc Finance Assistant Brinda Gadenadoo Excel Intermediate
The course overall was brilliant. The trainer for the day was amazing and made the course interesting and lively.
Great day!
Well done
More testimonials |
Clients
· Main client list
Article list
What's this?
Server loaded in 0.12 secs.
PUBLICATION GUIDELINES