Error handling

  • Thread starter Thread starter Brown
  • Start date Start date
B

Brown

I have a data entry form in which five of the 40 fields require a (properly
formated) entry. The standard error message is a bit more criptic than my
users will be able to process. Is there a good example/reference for
setting up custom eerror handling for this?
I'm using Access 2003

Brown
 
In the before update of the control, put it code that does
the error checking for the text or numbers that are
entered in the control. If it fails put in your own msgbox
and at the end set Cancel=True so that the control will
not update. It will also set the focus back to the control.
 
Frank,
I'm an Access novice compared to some of the folks on
here, but, if you want to have data entry formatted
properly a good way to go about it is to go to design
view on the tables and choose with field you want to
edit, then go down to the bottom where the field
properties are listed and select "input mask", which will
bring up another window allowing only a few "template"
stlye formats that data can be entered as. You want to
choose to edit the list and then you can tell Access
exactly how each field should be entered. I beleive that
you can also have it check the data that was entered
against certain values that you can tell access through
the "validation rules", which are right under the input
mask, what rules the data must follow. Especially easy if
the data is numeric.
Hope that helps, if not, I probably wont know the answer
if its more in depth than that.
Take care and good luck
URiah
 
That's basically what I've done, and it works well. The problem is that
with five fields that require input, when the user tries to save the record
that identifies the table and field where the data resides and tells the
user that it requires an entry. That name will not look to the user like
the caption label on the field in the form he/she is trying to fill out.

Brown
 
Hi Brown,

Thanks for your post. According to your description, I quite clear the
problem you encountered. Can you please describe it in detail so that I can
fully understand your concerns? It is appreciated that you can provide a
sample showing this problem.

I am looking forward to hearing from you soon.
Thank you,

Michael Shao
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 
I have a form that populates a single table.
There are about forty fields in the form.
Six of the fields in the table (including the Key field) are required
fields.
I the user opens a new record and fills some fields, but not all of the
required fields, then tries to save the record, an error message appears
that informs him that a field in "mytable.record4" requires input. The user
doesn't know that "mytable.record4" is the text field on the form labeled
"Serial Number". The same for the other required fields that did not get
inputs.
How can I modify the error message so that it is much more obvious what the
user needs to do to correct the error condition, i.e. "Please enter an seven
digit number in the Serial Number field."
Brown
 
Hi Brown,

Thanks for your feedback. If I understand correctly that you want to use
your own message box instead of the built-in error message to check the
input of your customers.

According to my research, it seems that there is not an easy way to
customize your own error message to check the input of your customers in
the Form level. However, in the database level (records and table level),
You can use the ValidationRule property to specify requirements for data
entered into a record, field, or control. When data is entered that
violates the ValidationRule setting, you can use the ValidationText
property to specify the message to be displayed to the user.

For more information regarding this issue, please refer to the following
article:
ValidationRule Property
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbaac10/htm
l/acproValidationRule.asp

Thanks for posting in community.

Regards,

Michael Shao
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 
Hello Brown,

How is the issue going on your side? Let us know if you need further
assistance.

Regards,

Michael Shao
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 
Hi Brown,

Thanks for your feedback. Did ValidationRule and ValidationText properties
meet your requirements? In this case, when we use them to specify
requirements (Not Null) for data entered into a record, please try to set
the required property of the record to "No" before you set the specify
requirements. Then set the there properties as below:

Validation Rule: Is Not Null
Validation Text: "<Your own message>"

Use the ValidationText property to specify a message to be displayed to the
user when data is entered that violates a ValidationRule setting for a
record. The message box with the customized message will pop-up if the
specific field is not entered.

Please feel free to post in the group if this solves your problem, or if
you would like further concerns.

Regards,

Michael Shao
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 
Back
Top