Re: Message Box



Rick,
Thanks for the reply.

The code works great untill I click OK.
The original code behind the Command Button on click event "DoCmd.Close" still closes the form losing any data entered.
How can I prevent this from happening?

Regards

John



"John" <johnlee2509@xxxxxxxxxxxxxxx> wrote in message news:E0C7A146-66D0-4560-B8D0-974F374B12FF@xxxxxxxxxxxxxxxx
Hi
On my form "frmExitDate" I have a field called "ExitDate" and a command button called "cmdCloseExitForm" The Field "frmExitDate" needs to be completed if a student has left the college.

When the button "cmdCloseExitForm" is clicked I would like a Message Box to give details about the empty field. i.e. "The Field Exit Date must be completed".

However if the Data entry person has opened this form by accident and the student has not left the College, I obviously need to be able to close the form without completing the field.

Any Help Please

Regards

John



.