trapping the untrappable ? -
06-22-2004
, 04:45 PM
I hope you can illuminate some error handling mysteries:
I read that if a sub doesn't do it's own error handling,
control propagates up the call stack to the sub that does have an
active "On Error", or failing that get's handled by the default access
handler(s).
I thought "Great, just what I need!", but from my experiments it
appears that this is not the case - that the scope of
"On Error" handling is strictly within the func/sub.
I am trying to trap the condition
"Cannot enter value into blank field on 'one' side of outer join."
but so far nothing I have tried successfully catches that error.
I have put OnError code into Form_Load, Form_Error,
TextBox_OnThisThatAndTheOther, but nowhere does
the above error get trapped.
If I could trap the situation in which a field-change was imminent, I
would create the (as yet non-existent) Detail record, link it to the
current Item record, requery, and proceed with the field change.
I have some forms which integrate fields from Item, ItemDetail,
ItemExtraDetail tables in a single, flat, design which looks just
like the eventual printed form. Many of the Detail fields are usually
blank. I am trying to resist fully populating the Details tables just
to avoid the above error condition
(which appears in the status line at the bottom of the access window).
At this point, the issue is one of trapping the apparently
untrappable. What am I doing wrong ? I am not doing
any weird or complex VBA coding or error handling, just the usual
stuff... |