Results 1 to 2 of 2
  1. #1
    New Lounger
    Join Date
    Jan 2003
    Ocean, New Jersey, USA
    Thanked 0 Times in 0 Posts

    Not-in-List (2000)

    When an entry is typed into a combo box that is not currently listed, would like to 1) go to a form to enter several fields and create a new record in the underlying table, and 2) add the entry into the combo box list (requery?). So far, can get the form to appear (via VBA for the NotInList event), but saving the record doesn't appear to work. Can someone suggest code or point me in the right direction?

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Thanked 28 Times in 28 Posts

    Re: Not-in-List (2000)

    If you do a search for NotInList in this forum, you'll find lots of threads dealing with this. The essential points are
    <UL><LI>You must open the form as a dialog, so that the calling code waits until the form has been closed or hidden. If you don't open the form as a dialog, the NotInList event handler will continue, so it won't find the new record.
    <LI>You must set Response = acDataErrAdded in the NotInList event handler to let Access know that you added a record to the row source of the combo box.[/list]See for example <post#=146637>post 146637</post#>, in particular the second example there.

Posting Permissions

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