PC Review


Reply
Thread Tools Rate Thread

Application Error Messages with variables in the Description

 
 
dch3
Guest
Posts: n/a
 
      15th Aug 2008
When working with errors that have descriptions that contain place holders
for object names, is there a way to retrieve the object name involved?

I have a custom error handler that displays a custom error message by
passing several parameters into a function to return a consistently formated
string for the error message...and avoid having to change millions of lines
of code if the message needs to be modified. When I pass in error such as
3200, I would like to return a complete message with the missing information.
The standard error message function uses AccessError() to get the error
description.

The record cannot be deleted or changed because table '|' includes related
records.
 
Reply With Quote
 
 
 
 
Klatuu
Guest
Posts: n/a
 
      15th Aug 2008
Use the Source property of the Err object
See the Object Browser for more info.
--
Dave Hargis, Microsoft Access MVP


"dch3" wrote:

> When working with errors that have descriptions that contain place holders
> for object names, is there a way to retrieve the object name involved?
>
> I have a custom error handler that displays a custom error message by
> passing several parameters into a function to return a consistently formated
> string for the error message...and avoid having to change millions of lines
> of code if the message needs to be modified. When I pass in error such as
> 3200, I would like to return a complete message with the missing information.
> The standard error message function uses AccessError() to get the error
> description.
>
> The record cannot be deleted or changed because table '|' includes related
> records.

 
Reply With Quote
 
dch3
Guest
Posts: n/a
 
      15th Aug 2008
Thank you and thank you for warning the Earth on its impending
self-destruction.

"Klatuu" wrote:

> Use the Source property of the Err object
> See the Object Browser for more info.
> --
> Dave Hargis, Microsoft Access MVP
>
>
> "dch3" wrote:
>
> > When working with errors that have descriptions that contain place holders
> > for object names, is there a way to retrieve the object name involved?
> >
> > I have a custom error handler that displays a custom error message by
> > passing several parameters into a function to return a consistently formated
> > string for the error message...and avoid having to change millions of lines
> > of code if the message needs to be modified. When I pass in error such as
> > 3200, I would like to return a complete message with the missing information.
> > The standard error message function uses AccessError() to get the error
> > description.
> >
> > The record cannot be deleted or changed because table '|' includes related
> > records.

 
Reply With Quote
 
Klatuu
Guest
Posts: n/a
 
      15th Aug 2008
The earth is not going to self destruct.
I am going to ordr Gort to destroy the earth if its inhabitants become a
threat to the universe.
--
Dave Hargis, Microsoft Access MVP


"dch3" wrote:

> Thank you and thank you for warning the Earth on its impending
> self-destruction.
>
> "Klatuu" wrote:
>
> > Use the Source property of the Err object
> > See the Object Browser for more info.
> > --
> > Dave Hargis, Microsoft Access MVP
> >
> >
> > "dch3" wrote:
> >
> > > When working with errors that have descriptions that contain place holders
> > > for object names, is there a way to retrieve the object name involved?
> > >
> > > I have a custom error handler that displays a custom error message by
> > > passing several parameters into a function to return a consistently formated
> > > string for the error message...and avoid having to change millions of lines
> > > of code if the message needs to be modified. When I pass in error such as
> > > 3200, I would like to return a complete message with the missing information.
> > > The standard error message function uses AccessError() to get the error
> > > description.
> > >
> > > The record cannot be deleted or changed because table '|' includes related
> > > records.

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Variables description in a function Lasse Microsoft Excel Programming 2 5th May 2006 10:21 AM
Re: Class public shared Variables vs. Application Variables in ASP.NET avnrao Microsoft ASP .NET 0 7th May 2004 06:28 AM
Error messages in application log Microsoft Windows 2000 Applications 0 24th Mar 2004 12:27 AM
Update --- User Environment variables ... a more precise description of the problem Houman Yahyaei Microsoft Windows 2000 Group Policy 4 21st Jan 2004 09:24 PM
Application error messages in XP Crose Windows XP Performance 0 27th Jul 2003 06:30 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:27 PM.