KenHigg Registered User Local time Today, 02:52 Joined Jun 9, 2004 Messages 13,289 Dec 2, 2004 #1 What would be the best pc of code to use to trap the sys dup value error to display a more user friendly error message and where would the best place to insert the code? I think it's err 3022... thxs, ken
What would be the best pc of code to use to trap the sys dup value error to display a more user friendly error message and where would the best place to insert the code? I think it's err 3022... thxs, ken
Mile-O Back once again... Local time Today, 06:52 Joined Dec 10, 2002 Messages 11,304 Dec 2, 2004 #2 I don't know what error it is but I seem to remember trapping that error number at the form level with the Error event.
I don't know what error it is but I seem to remember trapping that error number at the form level with the Error event.
KenHigg Registered User Local time Today, 02:52 Joined Jun 9, 2004 Messages 13,289 Dec 2, 2004 #3 Thanks - I was leaning in that direction but it seems some kind of table rule is firing off a message first... kh
Thanks - I was leaning in that direction but it seems some kind of table rule is firing off a message first... kh
KenHigg Registered User Local time Today, 02:52 Joined Jun 9, 2004 Messages 13,289 Dec 2, 2004 #4 Hum.... Seems the dup val message dialog has changed to one with out a err number... To be continued... kh
Hum.... Seems the dup val message dialog has changed to one with out a err number... To be continued... kh
M MStef Registered User. Local time Today, 06:52 Joined Oct 28, 2004 Messages 2,248 Dec 2, 2004 #5 Hello Ken! Look at DemoErrA97.mdb (MStef alias Štef) Attachments DemoErrA97.zip DemoErrA97.zip 15.1 KB · Views: 298
KenHigg Registered User Local time Today, 02:52 Joined Jun 9, 2004 Messages 13,289 Dec 2, 2004 #6 That's it! Thanks - Is it still raining there? kh
M MStef Registered User. Local time Today, 06:52 Joined Oct 28, 2004 Messages 2,248 Dec 2, 2004 #7 No it's not raining it's suny.
S SunWuKung Registered User. Local time Today, 06:52 Joined Jun 21, 2001 Messages 172 Dec 2, 2004 #8 What I would do is first get the error and see the error code. I would make an error trapping something like this: Private Sub Insert_Click On Error Goto Err_Insert_Click On Error Resume Next Insert ...... On Error Goto Err_Insert_Click If Err=xxxx Then MsgBox "Nope" Exit sub End if :Exit_InsertClick Exit Sub :Err_InsertClick Msgbox Err Goto Exit InsertClick hth. SWK ups......too late......
What I would do is first get the error and see the error code. I would make an error trapping something like this: Private Sub Insert_Click On Error Goto Err_Insert_Click On Error Resume Next Insert ...... On Error Goto Err_Insert_Click If Err=xxxx Then MsgBox "Nope" Exit sub End if :Exit_InsertClick Exit Sub :Err_InsertClick Msgbox Err Goto Exit InsertClick hth. SWK ups......too late......
KenHigg Registered User Local time Today, 02:52 Joined Jun 9, 2004 Messages 13,289 Dec 2, 2004 #9 Thank you Sun, I'll give your suggestion a look as well -