473,395 Members | 1,343 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Error messages

Hi -
re:Access2003 - Is there a way to change the text in an Access generated
Error Message? I would like to be able to take error 424, for example, and
have additional text appear. Also, is there a way to eliminate warning
messages such as "Warning, you are about to delete xxx records"?
Thanks for your help!
Mike
Jun 6 '06 #1
2 1827
I doubt you can change Access's error message (or that the way you would do
it would make it appealing). H

However, you can create your own table of additional text. At minimum put
an error number field and an additional text field. Create a function such
as MyErrorText(). It would receive the error number and Access' error text,
and return the adjusted text. A simple version:

public function MyErrorText(ErrNum as long, ErrText as string) as string

dim dim vMyText as variant
vMyText = dlookup("Additionaltext", "MyErrorTextTable", "[ErrNum]=" &
ErrNum)
if isnull(vMyText) = true then
MyErrorText = ErrText 'just return the original text if you don't have
anything to add
else
MyErrorText = ErrText & vbcrlf & vbcrlf & vMyText
endif

end function

Add your text before or after the standard text as you see fit.

You can even salt your text with "tokens", such as putting "[username]"
somewhere in the text and then processing that in your function to replace
the token with the user name.
Jun 6 '06 #2
To eliminate the warning messages that say "you are about to update xxx
records" etc:

docmd.setwarnings false
run your sql
docmd.setwarnings true

To append your own error message to the normal one:

In the error routine

msgbox mytext & err.description

how you get mytext is up to you - it can be held in a table as
suggested by Rick or hard coded if there is only a few places you want
to append text - eg

if err.number = 424 then
msgbox mytext & err.description
else
msgbox err.description
endif
resume xxx

Jun 7 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: lkrubner | last post by:
This is a general computer question, but I'm writing in PHP so I'll post this to comp.lang.php. I've been writing a content management system. I've a Singleton object that keeps track of all...
5
by: Steve | last post by:
Hi; I went to the microsoft site to try to find a guide to the error messages that the jdbc drivers give ( for sqlserver 2000 ). I had no luck. Does anyone know if there is such a guide? ...
10
by: DataBard007 | last post by:
Hello Access Gurus: I use Win98SE and Access97. I just built a simple Access97 application which holds all contact information for my personal contacts, such as first name, last name, address,...
10
by: Brian Conway | last post by:
I have no idea what is going on. I have a Login screen where someone types in their login information and this populates a datagrid based off of the login. Works great in debug and test through...
0
by: Janning Vygen | last post by:
Hi, i have a question about how to handle postgresql constraint errors in the client app. I found some mails in the archive about it, too. But i have still so many questions about how to do it,...
8
by: Brian Tkatch | last post by:
Server: DB2/SUN 8.1.6 Client: DB2 Connect Personal Edition (No 11) <URL:ftp://ftp.software.ibm.com/ps/products/db2/fixes2/english-us/db2winIA32v8/fixpak/FP11_WR21365/FP11_WR21365_CONPE.exe> ...
16
by: lawrence k | last post by:
I've made it habit to check all returns in my code, and usually, on most projects, I'll have an error function that reports error messages to some central location. I recently worked on a project...
2
hyperpau
by: hyperpau | last post by:
Before anything else, I am not a very technical expert when it comes to VBA coding. I learned most of what I know by the excellent Access/VBA forum from bytes.com (formerly thescripts.com). Ergo, I...
2
by: FutureShock | last post by:
I am using a registration class to process a registration form and need some opinions on returning error messages. I am self referring the page on submit. I would like to send each form field...
0
hyperpau
by: hyperpau | last post by:
Before anything else, I am not a very technical expert when it comes to VBA coding. I learned most of what I know by the excellent Access/VBA forum from bytes.com (formerly thescripts.com). Ergo, I...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.