Identifying the problem field

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

When you try to save a form after adding or updating and there is some
incorrect data in there (perhaps too long an entry for the field, or the
wrong format, etc) Access merely tells you in a very generic way that there
is something wrong with some of the data somewhere.
A recent example was a space in an email address, which I had set up in the
underlying table as a hyperlink type of input.
It would help at least to know which field the problem was in, but the
cursor isn't located there and there is no other way to tell what's up, where.
Is there any way of getting some clues, or do you just have to trawl through
each field on a trial and error basis?
Thanks
CW
 
Hi CW,

If you have specific field validation rules that you wish to enforce, try
using the Validation functionality, or alternatively if it's more complex
validation you are after, write some code in the "after update" event of the
field you are wishing to validate.

Alternatively you could trap the error that Access is returning and try to
translate it into something meaningful, but personally I prefer the above
method as it gives you greater flexibility and control over your field level
validations.

Hope this helps.

Damian.
 
Back
Top