Results 1 to 3 of 3
  1. #1
    jgelpi16 is offline Expert
    Windows XP Access 2010 32bit
    Join Date
    Mar 2010
    Location
    Charlotte, NC
    Posts
    544

    Question NotInList event

    How do I provide my own message when an item is not in a list? I have been able to create the message in the "NotInList" event, but I still get the generic Access message after my message. I would like to keep the generic message from displaying. I tried setting the "Limit to list" criteria to "No", but then it didn't hit my VBA code either.



    Code:
    Private Sub cboRegion_NotInList(NewData As String, Response As Integer)
    On Error GoTo ErrorHandler
        MsgBox "No contact information for this Region!" & vbCrLf & vbCrLf & "Please enter Region Contact information" & _
            " in ""Manage RVPs by Division"".", vbCritical, "Invalid Region"
        Exit Sub
    ErrorHandler:
        MsgBox "Critical Error!" & vbCrLf & vbCrLf & Err.Description, vbCritical, "Error # " & Err.Number
    End Sub

  2. #2
    orange's Avatar
    orange is online now Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,716
    This might be useful
    http://allenbrowne.com/ser-27.html

  3. #3
    jgelpi16 is offline Expert
    Windows XP Access 2010 32bit
    Join Date
    Mar 2010
    Location
    Charlotte, NC
    Posts
    544
    Very helpful. Thank you.

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

Similar Threads

  1. NotInList event issue
    By elinde in forum Forms
    Replies: 1
    Last Post: 04-01-2011, 08:43 PM
  2. Cancelling the NotInList event
    By Remster in forum Programming
    Replies: 12
    Last Post: 11-21-2010, 10:12 AM
  3. NotInList with Many to Many
    By SAC in forum Programming
    Replies: 17
    Last Post: 11-21-2010, 06:42 AM
  4. Replies: 0
    Last Post: 10-12-2010, 06:08 AM
  5. Troubleshoot NotInList Event Procedure
    By skyrise in forum Programming
    Replies: 4
    Last Post: 02-23-2009, 06:06 PM

Tags for this Thread

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