Results 1 to 3 of 3
  1. #1
    3 Star Lounger
    Join Date
    Jan 2001
    Posts
    294
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Error code help..

    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

  2. #2
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Error code help..

    You're missing an End If to match the If IsNull(Me![Initials]) Then ....
    Charlotte

  3. #3
    3 Star Lounger
    Join Date
    Jan 2001
    Posts
    294
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Error code help..

    Thanks Charlotte.. That was it..

Posting Permissions

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