By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,462 Members | 1,057 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,462 IT Pros & Developers. It's quick & easy.

Obtaining Table name from error message 3200

P: n/a
Hi to every one,

I wrote the following code
On erro goto err_Handler
Dim Db as dao.database
....
db.execute "Delete from Tblxxx where aaa=123"

err_Handler:
select case err.number
case 3200
msgbox err.description
case else
msgbox "...."
end select

if the record is referenced in others table the description "The record
cannot be deleted or changed because table
<tblDestination> includes related records"

Can I obtain only the table name without all the message?
Because i have to give this message to italian users, so they usually not
understand very well englisch and it's too easy for them to find
the record if they konw the table name.

Best regars.
Massimo

PS: Excuse me for my not good english

--
web: www.piubelli.net
Vuoi il mio indirizzo? Togli _cut_ per rispondermi
Nov 13 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
On Mon, 5 Jul 2004 18:03:45 +0200, "TheMax" <el**********@yahoo.it>
wrote:

Of course: just parse the message, extract the part(s) you want, and
display your own message. Something like:
dim strMsg as string
dim intSpacePosition as integer

case 3200:
strMsg=mid$(Err.Description,54)
intSpacePosition=instr(strMsg," ")
strMsg=Left$(strMsg,intSpacePosition-1)
Msgbox "Problema: " & strMsg

-Tom.

Hi to every one,

I wrote the following code
On erro goto err_Handler
Dim Db as dao.database
...
db.execute "Delete from Tblxxx where aaa=123"

err_Handler:
select case err.number
case 3200
msgbox err.description
case else
msgbox "...."
end select

if the record is referenced in others table the description "The record
cannot be deleted or changed because table
<tblDestination> includes related records"

Can I obtain only the table name without all the message?
Because i have to give this message to italian users, so they usually not
understand very well englisch and it's too easy for them to find
the record if they konw the table name.

Best regars.
Massimo

PS: Excuse me for my not good english


Nov 13 '05 #2

P: n/a
"Tom van Stiphout" <no*************@cox.net> ha scritto nel messaggio
news:9i********************************@4ax.com...
On Mon, 5 Jul 2004 18:03:45 +0200, "TheMax" <el**********@yahoo.it>
wrote:

Of course: just parse the message, extract the part(s) you want, and
display your own message.


Thank you very much for the answer, i hoped that exist somthing better than
parse the error message, but as this solution work ...

Best regards,
Massimo

--
web: www.piubelli.net
Vuoi il mio indirizzo? Togli _cut_ per rispondermi
Nov 13 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.