Results 1 to 5 of 5
  1. #1
    Join Date
    Oct 2004
    Posts
    6

    Unanswered: Error message for required entry on form

    Hi, I am a relatively new Access user and am probably over my head with this question.

    I had to design a database (for my job) that will be used for others to enter data in a form. One of the entries is required - they can use a drop down arrow to select or enter text. I left the default as blank because they might just accept the default and not really answer (they are really not the slugs I'm making them out to be!). Once I selected "required" it won't let them go to a new record without entering sonmething, however the error message is too cryptic for most of the users.

    Is there a way to edit the error message? Otherwise, I've been trying to use the expression builder (with onkeypress and linking it to that field). However I didn't know how to get it to recognize if a field "is blank" or how to get the message to pop up afterward. I've used the macro builder (in telling the form to always open to a new record), so I could try that but I having problems with the conditions again. I want the message to come up if they click through and leave the field blank.

    Any ideas???

    thanks,
    Deb

  2. #2
    Join Date
    Sep 2004
    Location
    Reston, VA
    Posts
    86
    Hi Deb, welcome to dbForums.

    You can easily do this without any code. In the Design View for the form, go to the properties of the combo box in question. There are two properties that appear on the Data tab. They are:

    Validation Rule - an expression evaluated whenever the control is changed
    Validation Text - a custom that will appear in a popup dialog when the validation rule evaluates to false

    To prevent a user from entering a Null or empty string "", put this as the Validation Rule:

    Is Not Null or <> ""

    Then, put your custom error message as the Validation Text.

    The user will not be able to move from that combo box until your validation conditions are met.

  3. #3
    Join Date
    Oct 2004
    Posts
    6

    Error message for required entry on form

    Hi Jeff,

    Thanks for the reply. I tried what you suggested and had no luck. Was I supposed to enter the entire phrase (Is Not Null or <> "")? I tried that and then also tried using just parts of it.

    Do you think that the entries that are already in the drop down list are preventing it from registering as blank? Or possibly some other option I selected?

    Thanks! Deb

  4. #4
    Join Date
    Sep 2004
    Location
    Reston, VA
    Posts
    86
    Yes, you should enter the entire phrase (without the parentheses, of course). It should work regardless of whether the combo box is bound to a field / query or unbound. Try clearing any Default Value setting you have for that field. You also may want to try changing the properties of the field itself in the table Design View. Try switching the Required property to Yes and the Allow Zero Length property to No. You can even put a Validation Rule / Text on the field itself there, instead of the form control. One of those should work.

    Hope that helps...

  5. #5
    Join Date
    Oct 2004
    Posts
    6

    Error message for required entry on form

    Thanks, Jeff, I'll try that.

    Deb

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •