• Error code help..

    Author
    Topic
    #352305

    I use this on the OnError event of a form.. What I want this to do is check the Initials field for a value.. If it’s null I’m trying to use the custom message box instead of the Access one.. This code keeps gving me a compile error “Case else outside select case”.. Can anybody figure out why? Thanks..
    Private Sub Form_Error(DataErr As Integer, Response As Integer)
    Select Case DataErr
    Case 3314 ‘Required field = Null
    If IsNull(Me![Initials]) Then
    MsgBox “Initials field is blank. You must enter data in Initials field to continue.”, vbCritical + vbOKOnly, “IDC Receipt System Message”
    Response = acDataErrContinue
    Case Else
    Response = acDataErrDisplay
    End Select
    End Sub

    Viewing 0 reply threads
    Author
    Replies
    Viewing 0 reply threads
    Reply To: Error code help..

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: