Results 1 to 2 of 2
  1. #1
    craigugoretz is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Feb 2015
    Posts
    9

    Entering new information in a combo box

    I need to pop up a new form to enter new information into a combo box in a form. I had written a macro and attached it to the onClick functionality of a button that I placed next to the combo box.

    On its first line was an OpenForm command (a dialog, editable), and on its second line was a Requery command. This was working well for awhile.

    Now it gives me the error "You must enter a value in the [Media].[Media type] field" when I start from a database with no records in it. When I click on OK, I get an error number 2950 on the Requery command. I press the "Stop All Macros" button. However, when I look at the contents of the combo box, the value that I entered into the Media Type form (the form that was opened from the button) is present in the combo box. So it works, apparently.



    Now, when I went back to the Media type form and entered a second value, I get an error when I return to the Media form. It was concerned with no value entered for the next text box in the form after the combo box. All fields are required in the Media and Media Type tables. The second value did show up in the combo box.

    Thank you for your help with this. This is just my first pass at describing the problem, so feel free to ask for clarification.

    -- Craig

    P.S. I found this web site with possible solution to the problem: http://allenbrowne.com/ser-27-01.html

  2. #2
    NTC is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    Nov 2009
    Posts
    2,392
    well comboboxes are typically sourced on a table (or a query of a table) and so adding to it means adding a new record to its table. the idea is pretty straight forward but its unclear on the user interface and technique you are using although it really doesn't matter as long as the new record is being entered.

    the 'must enter' sounds like the field, in the table, has its property set to Required = Yes....and perhaps that it is and was a good idea but is what is probably causing the issue....experiment by checking that and changing it to No....

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 3
    Last Post: 01-27-2015, 11:46 AM
  2. Replies: 1
    Last Post: 12-18-2014, 09:10 PM
  3. Replies: 6
    Last Post: 02-19-2014, 11:11 AM
  4. Replies: 1
    Last Post: 06-15-2011, 03:29 PM
  5. Replies: 7
    Last Post: 09-22-2010, 02:32 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums