Results 1 to 2 of 2
  1. #1
    EddieN1 is offline Competent Performer
    Windows XP Access 2007
    Join Date
    May 2011
    Posts
    313

    Editing form control except when closing form


    I have a subform with a required field as the first field. There are only 4 valid values. I have the values in a combo box so that if something is selected, it must be one of the options. However, if the operator hits tab or puts the mouse on another field, the "not in list" doesn't trigger. I tried added the edit to the "On Exit" event but then it triggers when the operator just wants to close the form. How can I require a specific set of values (null is not valid) but not trigger if the operator is just closing the form? Thanks for your help. Eddie

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,948
    NotInList event only runs if there is code in it and if LimitToList property is set to Yes.

    If the field requires data then user must select one of the values or the record committment will fail and error will trigger. If you want to allow user to abort new record, that is another issue.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Replies: 5
    Last Post: 12-22-2011, 01:12 PM
  2. Closing a form through VBA
    By ghostmachine in forum Forms
    Replies: 4
    Last Post: 12-13-2010, 01:57 PM
  3. Closing and saving a form
    By Lxmanager in forum Forms
    Replies: 14
    Last Post: 11-21-2010, 02:04 AM
  4. Prevent a form from closing
    By ksmithson in forum Forms
    Replies: 0
    Last Post: 07-15-2010, 12:49 PM
  5. Closing a Form Problem
    By MuskokaMad in forum Forms
    Replies: 2
    Last Post: 03-18-2010, 05:58 AM

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