Validating dates in access

Posted by / 17-May-2016 03:29

Validating data in Microsoft Access allows you to check data whilst it is being entered by the database user and will enable you to not save the data if it breaks any validation rules or routines.It is easy for an end user to make a mistake when they are entering data or even to leave out important details that must be entered, so we need to check this data when it is being entered into the database.Access automatically displays the date and time in the General Date and Long Time formats. For example, in Europe and many parts of Asia, depending on your location, you might see the date and time as PM or 28/11/2006 PM. were mm is the month, dd is the day, and yyyy is the year.

I am currently trying to validate data in an access database.It should stop user there unless it enters right date.Secondly I entered the code at form before update event, it worked when I hit the save button but after the message it gives MS message 'You canceled the previous operation' , i guess its bcos of Do Cmd.The display format that you select will not affect how the data is entered or how Access stores that data.For example, you can enter a date in a European format such as , and have the table, form, or report display the value as 11/28/2006.

validating dates in access-3validating dates in access-48validating dates in access-41

Allowing invalid data to be entered into the database ensures that the database and the data available will become less valuable and harder for the user to use.

One thought on “validating dates in access”