Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Replace System Error Message

Status
Not open for further replies.

BSC5905

Technical User
Apr 30, 2004
20
0
0
US
Is it posible to replace the system error message with a custom define message when ever the primary key is violated? (ie duplicated records)
 
Depends where you are getting them. This is the table/relationships forum, we will usually not expose the tables and relationships to the users (or is it the other way around?), but say - in a form, you'd use the form error event

[tt]if dataerr = <the error> then
msgbox "your message"
responce = acdataerrcontinue ' this removes the default message
end if[/tt]

I never remember which errors this is, so just place a msgbox dataerr within the event procedure, then in the form enter a dupe, and you'll pick up the number to use in the above if statement. BTW - the forms forum is forum702

Roy-Vidar
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top