Ask Me Help Desk

Ask Me Help Desk (https://www.askmehelpdesk.com/forum.php)
-   Access (https://www.askmehelpdesk.com/forumdisplay.php?f=441)
-   -   The object doesn't contain the Automation object '|.' (https://www.askmehelpdesk.com/showthread.php?t=72285)

  • Mar 15, 2007, 05:21 AM
    atristan
    The object doesn't contain the Automation object '|.'
    Hello,
    And thank you for taking this question. I currently support a small Access system and ran into the error mentioned in the title. I believe that the issue is system-specific because I ran the system from my desktop and printed fine. The issue centers around the cmdPrint command function. Here is the code that is running...

    Code:

    Private Sub cmdPrint_Click()
        Dim intCancel As Integer

        On Error GoTo Err_cmdPrint_Click
       
        Call Form_BeforeUpdate(intCancel)
        If Not intCancel Then
            DoCmd.RunCommand acCmdSaveRecord
            DoCmd.OpenReport "WSAR detail", acNormal, , "[WSAR Number]=" & WSAR_Number
        End If

    Exit_cmdPrint_Click:
        Exit Sub

    Err_cmdPrint_Click:
        MsgBox Err.Description
        Resume Exit_cmdPrint_Click
       
    End Sub

    When the user clicks print from his system, he gets the following error:
    The object doesn't contain the Automation object '|.'

    I found this information at Clearpoint Systems Code Library regarding this type of error but don't really understand what could be attempting to set a property or method:

    Quote:

    2766
    The object doesn’t contain the Automation object ‘|.’You tried to run a Visual Basic procedure to set a property or method for an object. However, the component doesn’t make the property or method available for Automation operations.@Check the component’s documentation for information on the properties and methods it makes available for Automation operations.
    Again, I believe that this issue is system-specific because I ran it fine and I have had no other complaints from any other users. Any leads would be greatly appreciated. Thank you have have a great day.
  • Mar 15, 2007, 06:39 AM
    ScottGem
    The problem may not be in this snippet of code. Unless WSAR Number is not a numeric datatype, the code looks correct. EVen if it wasn't you would get a different error.

    However this snippet also calls the Before Update event of the form. What you need to do is use Debug mode to find the EXACT line that is giving the error and post that. Then we may be able to spot the problem.

  • All times are GMT -7. The time now is 01:38 AM.