Advertisement

12.06.2007 at 06:32AM PST, ID: 23006040
[x]
Attachment Details

MS Access Text Box Custom Error Message

Asked by TylerDerden in Access Coding/Macros, Access Forms

Tags: , , , ,

I have a text box called Txt_Date_Opened.

Rather than have the standard error message that if a use does not enter the proper date I would like to prompt with a more helpful message such as,  "Please enter a valid date in the format mm/dd/yyyy".

I've placed the following code in both the On Enter and On Exit but it doesn't work.

Start Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
On Error GoTo Dt_Error
 
  Exit Sub
 
 Dt_Error:
 
  MsbBox "Please enter the date in the format mm/dd/yyyy", , "Attention"
  Exit Sub
[+][-]12.06.2007 at 06:53AM PST, ID: 20420009

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]12.06.2007 at 06:59AM PST, ID: 20420059

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]12.06.2007 at 07:27AM PST, ID: 20420329

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]12.06.2007 at 07:40AM PST, ID: 20420448

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]12.06.2007 at 08:06AM PST, ID: 20420683

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]12.06.2007 at 08:09AM PST, ID: 20420705

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Access Coding/Macros, Access Forms
Tags: access, error, ms, message, box
Sign Up Now!
Solution Provided By: jimhorn
Participating Experts: 1
Solution Grade: A
 
 
[+][-]12.06.2007 at 10:56AM PST, ID: 20422090

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628