[AccessD] Suppress error message dialog

Arthur Fuller fuller.artful at gmail.com
Mon Apr 23 11:40:31 CDT 2018


I think Triggers are your best bet, shy of a managerial mandate forbidding
cut-and-paste. But as written above, there may exist sound reasons for
getting around the "now available" rule, such as "Will be available by the
time this order is processed." Just one example.

It seems to me that a discussion involving management, users who regularly
do this, and yourself. The Users Who Regularly Do This (TURDT :) should be
first to explain their behaviour. Management should be second to the plate,
having heard TURDT's reasoning. Finally, you step up, having heard their
respective perspectives, and either figuring out how to satisfy both camps,
or to explain why both cannot be satisfied within the limits of Excel.
OTOH, perhaps both camps can be satisfied, insofar as their rules are
sufficiently and effectively explained, in detail, and with known
exceptions thoroughly described.

It's also true that unknown exceptions cannot be described prior to their
occurrence; but that ought not stop us from thoroughly describing the known
exceptions, and unveiling the reasoning behind their existence.

This, I am woefully too aware, is the most difficult aspect of
application-development. In this light, I shall relate a tale from my
thankfully distant past, involving an insurance company. Various reports
were required, about 87% of which reported accurate data while the
remaining 13% contained a few inaccurate result-rows. I slaved over my
logic and algorithms for about 6 weeks, of meetings with the stakeholders
and various persons higher up the food chain, when someone at a meeting, in
early December of that year, casually mentioned that the InsCo operated on
360-day years, in essence forgiving the Holiday Season. Meanwhile I had
gone so far as to factor in leap years and consequent calculations, and
hence, depending upon the life-span of any given pension fund, my calcs and
theirs might differ. Nobody thought to mention this accounting fiction
until the project was six weeks late, and only then mentioned in passing,
as if this humble programmer ought to have known the shenanigans this
insurance company was pulling. That contract cost me a bundle -- well not
compared to what Trump considers a bundle, but in my local league, six
weeks of work wasted results in a bundle. To escape this IMHO lack of
specification, the principal stakeholder dismissed me with a simple, "This
is standard practice in our line of work. If you'd done your research,
you'd have known that. This is on you."

Lacking the funds to pay a lawyer, I succumed and took the economic scar as
a badge of honour, much like German swordsmen wore their scars. The
difference is that scars from a sword imply honour, while scars on your
resumé follow you forever, and do not get you laid by a woman who likes
scarred women -- which means most women. But now I'm echoing too much
reading of Raymond Chandler, Dash Hammett and James McCain, so best I stop,
and return to the novel upon I'm currently at work, whose conscious
intention is to emulate those great crime writers, and to that esteemed
list I would add the late Philip Kerr, whose Bernie Gunther novels are
inimitable.

Arthur

On Mon, Apr 23, 2018 at 12:03 PM, Dan Waters <df.waters at outlook.com> wrote:

> I've never used triggers in SQL tables.  Please follow up!
>
> Thanks!
> Dan
>
> -----Original Message-----
> From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of
> Ryan W
> Sent: April 23, 2018 09:57
> To: Access Developers discussion and problem solving
> Subject: Re: [AccessD] Suppress error message dialog
>
> Management is involved.  The sort of problems that this would have caused
> if it wasn't caught would have been monumental next time we go through an
> audit.
>
> I didn't know that the users were doing the ole copy/paste method on these
> records until it was brought to my attention.
>
> I decided to write this logic into a trigger instead of the front end
> because we have some older (Win XP) machines that run an older version of
> the front end/Access than most of the other workstations in the office
> (Most of us are on Office 2013).  So rather than manage/maintain two sets
> of form code I figured I'd write it in to the back end as a trigger.
>
> The objects they are pasting are consumables, so when they are marked
> consumed they are no longer able to be selected via the combo box
> dropdown... but as I said pasting the record in circumvents that.  I'd have
> to use an AfterInsert action to back the 'bad records' back out.
>
> I'll see how this trigger works out.
>
>
>
> On Mon, Apr 23, 2018 at 9:44 AM, Dan Waters <df.waters at outlook.com> wrote:
>
> > Hi Ryan,
> >
> >  I wouldn't see this is as primarily a technology issue for you to solve.
> > It sounds like they have a different belief in what their process is than
> > you are aware of.  I'd get together with a few of the experienced users
> to
> > find out what's going on?
> >
> > It might be that they know that they can use a non-active object on your
> > form because it will soon be active?  Just a guess...  If what they are
> > doing turns out to be OK then perhaps you could add a 'Clone' button next
> > to the previous records so they don't need to copy/paste.
> >
> > If you and your users are working in the same company then you should
> > raise this issue with your management and theirs.  This is not to give
> them
> > grief, but just so that everyone knows that this issue is happening.  You
> > can describe the consequences of taking these actions and then they can
> > decide if they want to continue on this way or if they want to 'obey'
> your
> > validation warnings.  Put the problem on their back instead of yours.
> >
> > If you are working for a client it's about the same thing - but you'll
> > need to be more formal by writing up a document of what's happening and
> > what the consequences are.  Let your contact person know that you are
> going
> > to send this to him or her so they can decide how to proceed.
> >
> > For the technical solution it seems like you are presenting a form in
> > table view which allows them so paste in a record (I've just never done
> > that).  You could change the form to form view with all individual fields
> > which then have all the correct validation code.  More work for them but
> > then they probably can't get around the validation.
> >
> > Good Luck!
> > Dan
> >
> > -----Original Message-----
> > From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of
> > Ryan W
> > Sent: April 23, 2018 09:08
> > To: Access Developers discussion and problem solving
> > Subject: [AccessD] Suppress error message dialog
> >
> > I've got some tricky users that were getting around some of my validation
> > process on a datasheet... I had set the combo boxes to limit to list on
> > objects that were 'active' in inventory.
> >
> > They got around this by pasting in records from a previous piece of
> work..
> > which doesn't go trigger the combobox validation.
> >
> > In this instance I decided to use an "INSTEAD OF INSERT" trigger on my
> SQL
> > Back end...
> >
> > The problem now becomes they get an error message that I raise in the
> > trigger, but then they get a dialog box that says:
> >
> > "Do you want to suppress further error messages telling you why records
> > can't be pasted".
> >
> > The default option is "yes". here.  They need to answer "no" to see more
> > messages, but ideally I'd like to completely suppress this box from
> coming
> > up and have it spew every "paste error" at them.
> >
> > Does anyone have any ideas how I might do that without changing the
> > validation code to the front end?
> > --
> > AccessD mailing list
> > AccessD at databaseadvisors.com
> > http://databaseadvisors.com/mailman/listinfo/accessd
> > Website: http://www.databaseadvisors.com
> >
> > --
> > AccessD mailing list
> > AccessD at databaseadvisors.com
> > http://databaseadvisors.com/mailman/listinfo/accessd
> > Website: http://www.databaseadvisors.com
> >
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>



-- 
Arthur


More information about the AccessD mailing list