Results 1 to 2 of 2
  1. #1
    Ray67 is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    338

    Error 2467

    Hello

    I'm getting this error on my form Error 2467 The expression you entered refers to an object that is closed or doesn't exist. This was working before fine. Here is the vba

    Private Sub Command18_Click()
    On Error GoTo Err_Command18_Click




    DoCmd.GoToRecord , , acNewRec


    Exit_Command18_Click:
    Exit Sub


    Err_Command18_Click:
    MsgBox Err.Description
    Resume Exit_Command18_Click

    End Sub
    Private Sub Command19_Click()
    On Error GoTo Err_Command19_Click




    DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70


    Exit_Command19_Click:
    Exit Sub


    Err_Command19_Click:
    MsgBox Err.Description
    Resume Exit_Command19_Click

    End Sub
    Private Sub Command20_Click()
    On Error GoTo Err_Command20_Click




    DoCmd.Close


    Exit_Command20_Click:
    Exit Sub


    Err_Command20_Click:
    MsgBox Err.Description
    Resume Exit_Command20_Click

    End Sub
    Private Sub Form_AfterUpdate()
    On Error GoTo Err_Handler
    'Purpose: Requery the combo that may have called this in its DblClick
    Dim cbo As ComboBox
    Dim iErrCount As Integer
    Const strcCallingForm = "TabRefundRequestForm"

    If CurrentProject.AllForms(strcCallingForm).IsLoaded Then
    Set cbo = Forms(strcCallingForm)![HSS Number]
    cbo.Requery
    End If

    Exit_Handler:
    Exit Sub

    Err_Handler:
    'Undo the combo if it has a partially entered value.
    If (Err.Number = 2118) And (iErrCount < 3) And Not (cbo Is Nothing) Then
    cbo.Undo
    Resume
    End If
    MsgBox "Error " & Err.Number & ": " & Err.Description
    Resume Exit_Handler
    End Sub


    Private Sub Form_BeforeDelConfirm(Cancel As Integer, Response As Integer)
    If Response = acDeleteOK Then
    Call Form_AfterUpdate
    End If
    End Sub




    Private Sub Form_BeforeUpdate(Cancel As Integer)
    On Error GoTo Err_Form_BeforeUpdate_Error








    If Nz(Me.[User], 0) = 0 Then
    MsgBox "Please enter User Name!!!"
    Cancel = True
    User.SetFocus
    Exit Sub
    End If


    If Nz(Me.[HSS Number], 0) = 0 Then
    MsgBox "Please enter Hss Number!!!"
    Cancel = True
    [HSS Number].SetFocus
    Exit Sub
    End If


    If Nz(Me.[PatientName], 0) = 0 Then
    MsgBox "Please enter Patient Name!!!"
    Cancel = True
    [PatientName].SetFocus
    Exit Sub
    End If


    If Nz(Me.[PatientLastName], 0) = 0 Then
    MsgBox "Please enter Last Name!!!"
    Cancel = True
    [PatientLastName].SetFocus
    Exit Sub
    End If


    If Nz(Me.[Address], 0) = 0 Then
    MsgBox "Please enter Address!!!"
    Cancel = True
    [Address].SetFocus
    Exit Sub
    End If


    Exit_ErrorHandler:
    Exit Sub


    Err_Form_BeforeUpdate_Error:


    MsgBox "Error " & Err.Number & " (" & Err.Description & ") in procedure Form_BeforeUpdate of VBA Document Form T_PatientDemographicsForm at Line " & Erl
    Resume Exit_ErrorHandler




    End Sub

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    Which line triggers the error? Comment out the On Error GoTo line and debug. Refer to link at bottom of my post for guidance on debugging techniques.
    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. Runtime 2467 only on a Win 7 Machine
    By ilikebirds in forum Forms
    Replies: 3
    Last Post: 12-11-2012, 03:58 PM
  2. Replies: 0
    Last Post: 07-16-2012, 05:42 AM
  3. Replies: 2
    Last Post: 06-23-2012, 11:59 PM
  4. Replies: 6
    Last Post: 05-30-2012, 12:32 PM
  5. Replies: 1
    Last Post: 05-11-2012, 10:59 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