G
Guest
MS Access 2000, Windows XP
======================
Hi,
I'm trying to generate more user-friendly/less technical custom error
messages in a form. I've figured out to code this in the form's "On Error"
section using DataErr.
But, the issue I'm grappling with is that the same error can be generated by
more than one field on the form. In that case, how can I include the field
name in the error message I generate?
As an example, I have a Text control bound to ProjectDate, and another text
control bound to ProjectName. Both of these are required fields in the table,
and I'd like to keep it that way.
If I leave the ProjectDate text control blank, I get error # 3314 (generated
when a required field has no value). I get the same error number when I leave
the ProjectName text control blank.
So, how do I figure out which control on the form generated the error so
that I can include appropriate error message ("Please type in a Date" versus
"Please enter a name for the Project") and set focus to the control that
caused the error?
Thanks for any help/pointers.
-Amit
======================
Hi,
I'm trying to generate more user-friendly/less technical custom error
messages in a form. I've figured out to code this in the form's "On Error"
section using DataErr.
But, the issue I'm grappling with is that the same error can be generated by
more than one field on the form. In that case, how can I include the field
name in the error message I generate?
As an example, I have a Text control bound to ProjectDate, and another text
control bound to ProjectName. Both of these are required fields in the table,
and I'd like to keep it that way.
If I leave the ProjectDate text control blank, I get error # 3314 (generated
when a required field has no value). I get the same error number when I leave
the ProjectName text control blank.
So, how do I figure out which control on the form generated the error so
that I can include appropriate error message ("Please type in a Date" versus
"Please enter a name for the Project") and set focus to the control that
caused the error?
Thanks for any help/pointers.
-Amit