Re: Changing default key violation message?
From: Jeff Boyce (JeffBoyce_IF_at_msn.com-DISCARD_HYPHEN_TO_END)
Date: 01/02/05
- Next message: RipperT: "Re: message box pop up problems"
- Previous message: Jeff Boyce: "Re: Makeing at least one record required! Re-post"
- In reply to: Howard: "Changing default key violation message?"
- Next in thread: Howard: "Re: Changing default key violation message?"
- Reply: Howard: "Re: Changing default key violation message?"
- Messages sorted by: [ date ] [ thread ]
Date: Sun, 2 Jan 2005 05:26:43 -0800
Howard
You could add error handling to your code, intercept the error number, and
create/display your own message.
You could add code to the RegistrationNumber field's BeforeUpdate event that
checks for the situation and prevents it, rather than allowing a user to
fill in a form and THEN telling him/her that they couldn't do that ("start
over, you made a mistake back up in line 7"). You'd add your message in
that BeforeUpdate routine, and set Cancel = True to not accept the
duplicated registration number.
-- Good luck Jeff Boyce <Access MVP> "Howard" <nospam@home.please.co.uk> wrote in message news:g5qdnQT1mIvcWUrcRVn-2Q@nildram.net... > Can this be done? > > How would I trap the error and present a more freindly message like "You > cannot have two cars with the same registration number" rather than the > complex, non user freindly message that access gives me. > > Howard > > >
- Next message: RipperT: "Re: message box pop up problems"
- Previous message: Jeff Boyce: "Re: Makeing at least one record required! Re-post"
- In reply to: Howard: "Changing default key violation message?"
- Next in thread: Howard: "Re: Changing default key violation message?"
- Reply: Howard: "Re: Changing default key violation message?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|