Results 1 to 7 of 7
  1. #1
    Join Date
    Apr 2007
    Posts
    45

    Unanswered: Required field error message

    I am having problems with Access saying that 2 fields in a subform are required when they aren't. The 2 fields in question have been set up as combo boxes, but I have checked in the tables, and they are not set up as being required. I have also checked their property formats and nowhere can I find the source as to why Access thinks it is a required field.

    What is particularly frustrating about this situation, is that I have built another database that has a subform with combo boxes, and I have built this new database exactly like I built my other one, yet they are not acting the same!

    Has anyone ever experienced this bug and how did you fix it?

    Thanks in advance for your help.

  2. #2
    Join Date
    Apr 2007
    Posts
    45
    One more piece of information that I forgot to include - if I enter the information into the table directly, it does not give me this error message. I only get the message when trying to enter data through the subform.

  3. #3
    Join Date
    Apr 2007
    Posts
    45
    Okay, now, I am REALLY frustrated. I have several combo boxes in the main form that this subform is on. On Friday, this main form was working just fine. However, today was entering some data into it, and low and behold, I got the required field error message on one of my combo boxes - what is most perplexing about this, is that the field it was telling me that I needed to have information in it, had information in it!

    Did gremlins attack my database over the weekend? Someone please tell me you have come across this glitch and found a way to fix it.

    Thanks again.

  4. #4
    Join Date
    Jan 2007
    Location
    California, USA
    Posts
    520
    Jill,

    What version of Access are you dealing with? And, is there any way for you to post this database so we could look at it on our own machine?

    Thanks,

  5. #5
    Join Date
    Dec 2004
    Location
    Madison, WI
    Posts
    3,926
    Gremlins attacking a database is usually the first thought when an error comes up where it seems like everything is setup correctly but usually you find it's rather something simple causing the error.

    What is the bound field in the combobox on the form and what are the columns of data? It sounds like the combobox on the form is setup wrong.

    Try adding a button which when clicked: msgbox(me!MyComboboxName) to see what value is actually in the combobox and trying to be saved. Also try simply recreating the combobox via the wizard. Is there a default value set for the combobox on the form?

    When you enter data directly into the table, is there a combobox when you view the data in the table and not through a form? (which means this field has a lookup table based on it.)

    Also, are you getting an error message to the effect that the field cannot be null (i.e. required) or are you getting a message to the effect that you must select a matching value in the list? (what is the exact error you're getting?)

    Is the Allow Zero Length for the field in the table design (below the required property) set to Yes or No?
    Last edited by pkstormy; 10-15-07 at 17:56.
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

  6. #6
    Join Date
    Apr 2007
    Posts
    45
    Thank you for both of your suggestions. The problem turned out to be in the tables. The foreign keys were set up as numbers and the default value was set to 0. I guess Access 2003 automatically puts the 0 in when you set up a field as a number? Anyway, when I deleted the 0 from the default value in the tables, my problem was solved.

  7. #7
    Join Date
    Jan 2007
    Location
    California, USA
    Posts
    520
    Jill, thanks for posting the solution you found. Yes, you are right about Access making a numeric field have a zero as the default value for the field.

Posting Permissions

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