"The value entered isn't valid for this field" No longer appears

  • Thread starter Thread starter scadav
  • Start date Start date
S

scadav

All,

I have been implementing some new features in an access database and I
have several date text boxes on multiple forms. It used to pop-up a
messages "The value entered isn't valid for this field" when I
entered an invalid date, now it just freezes me in the form until I
change it to the correct format, without any pop-up messages.

I have been utilizing DoCmd.SetWarnings, but I have checked all code
and it appears that I have turned it back on after I had shut it off.

Further, just for testing sake, I created a DoCmd.SetWarnings True and
set it for the OnLoad event on one of the forms with a date box and
still no pop-up.

Does anyone know how I can get these pop-up messages back?

Thank you
Dave
 
Dave:

Do you have any code in the form's Error event procedure which might be
intercepting the error and setting the return value of the Response argument
to acDataErrContinue? If for instance you setting the return value of this
argument to this constant to cater for another anticipated data error in the
form without making it conditional on the value of the DataErr argument then
it will catch all data errors and suppress the system message. The DataErr
value for an invalid date would, I think, be 2113, so you could handle this
specifically in the Error event procedure and either return the system
message (acDataErrShow) or you could suppress it and return a custom message
with the message box function.

Ken Sheridan
Stafford, England
 
Thanks Ken. But it doesn't appear that I have that arguement.
Additionally, I have about 4 forms with text boxesusing a date and they
all do the same thing (Don't pop-up the warning). It seams to be a
database wide problem
 
Dave:

The only other possibility that springs to mind is that the application is
being opened in a runtime environment, in which you have to incorporate
custom error handling, but from what you say it doesn't sound like that's the
case. Are you sure the dates are truly invalid? Access is a bit too clever
at times and if an invalid date in one international format is vaid in
another it will 'correct' it without any error being raised. If I entered a
date which was invalid here in Europe but valid in the USA for instance, e.g.
07/25/2006 it would convert it to 25 July.

Ken Sheridan
Stafford, England
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top