If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
customize error messages
How do I customize error messages for data input on forms (without code).
fields have validation, I would like to write my own error messages. (I know how to use the validation rule/text property.) thank you |
#2
|
|||
|
|||
customize error messages
Hi Deborah.
Since you are not talking about the validation rule/text, I presume you are talking about the engine-level messages such as "The value is not apprpriate...", or "Required...", or "... would be a duplicate..." You need to use the Error event of the form to trap these errors. Unfortunately this does mean you need to use code. If you use a macro you will not know which error occurred, and so you would be limited to an extremely generic msgbox that said basically, "Oops: that didn't work, but I can't tell you why." -- Allen Browne - Microsoft MVP. Perth, Western Australia. Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps dot org. "Deborah" wrote in message ... How do I customize error messages for data input on forms (without code). fields have validation, I would like to write my own error messages. (I know how to use the validation rule/text property.) thank you |
#3
|
|||
|
|||
customize error messages
On Mon, 6 Feb 2006 00:45:28 -0800, Deborah wrote:
How do I customize error messages for data input on forms (without code). fields have validation, I would like to write my own error messages. (I know how to use the validation rule/text property.) thank you Without Code? You can't. With Code... it's quite easy. Here's how you can find the correct error and show your own message for any of the form level errors. First code the Form's Error event: MsgBox "Error#: " & DataErr ' Display the error number Response = acDataErrDisplay ' Display Default message Then open the form and intentionally make that error. The message box will display the error number and the default error message. Next, go back to the error event and change that code to: If DataErr = XXXX Then Response = acDataErrContinue ' Don't display the default message MsgBox "Please enter data in all required fields." Else MsgBox "Error#: " & DataErr Response = acDataErrDisplay ' Display Default message End If where XXXX is the error number. -- Fred Please respond only to this newsgroup. I do not reply to personal e-mail |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
disable customize option when right click on menu bar | areddy | General Discussion | 0 | October 20th, 2005 09:14 AM |
Customize the Places Bar (Common Dialogs) in Office XP | SeaMaid | General Discussions | 1 | October 15th, 2005 01:32 AM |
Customize Toolbar Immediate Reset | NoExpert | General Discussion | 5 | September 19th, 2005 03:50 PM |
help: insert symbol and tools customize not working properly | greg | General Discussion | 2 | August 28th, 2005 07:54 AM |
Error Message when trying to customize font in Mail Contacts and N | Ric Lager | General Discussion | 0 | September 27th, 2004 09:27 PM |