Results 1 to 4 of 4
  1. #1
    offie is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2013
    Posts
    176

    Problem occured while communication wiht the OLE server or ActiveX Control...?


    I get this error when I click on a command that I just made, a simple search, linking to a query whose criteria come from on text box.
    I do have other code on this form relating to check boxes, but when I get rid of it and save and try again it doesnt seem to be the problem.

    More infor on the error
    *The expression may not result in the name of a macro, the same of a user-defined function, or [Event Procedure]
    *There may have been an error evalutation the function, event, or macro


    My issue is that I have no idea what it is that I have to fix, any suggestions?

    Thank!


    Just in case, code:
    Code:
    Option Compare Database
    Private Sub Command820_Click()
    DoCmd.OpenQuery "ConstructionClientSurveyQ"
    DoCmd.Close acQuery, "ConstructionClientSurveyQ"
    [Forms]![Navigation Form]![NavigationSubform].[Form]![NavigationSubform].Requery
    End Sub
    
    Private Sub Cost1_Click()
    If Me.Cost1 = True Then
            Me.Cost4.Value = False
            Me.Cost3.Value = False
            Me.Cost2.Value = False
            Me.Cost5.Value = False
        End If
         
         
        If Me.Cost1 = False Then
            If Me.Cost4.Value = False Then
                If Me.Cost3.Value = False Then
                    If Me.Cost2.Value = False Then
                         If Me.Cost5.Value = False Then
                             Me.Cost1.Value = True
                        End If
                    End If
                End If
            End If
        End If
         
         
        Me.Requery
        
    End Sub
    
    Private Sub Cost2_Click()
    If Me.Cost2 = True Then
            Me.Cost4.Value = False
            Me.Cost3.Value = False
            Me.Cost5.Value = False
            Me.Cost1.Value = False
        End If
         
         
        If Me.Cost2 = False Then
            If Me.Cost4.Value = False Then
                If Me.Cost3.Value = False Then
                    If Me.Cost5.Value = False Then
                         If Me.Cost1.Value = False Then
                             Me.Cost2.Value = True
                        End If
                    End If
                End If
            End If
        End If
         
         
        Me.Requery
    End Sub
    
    Private Sub Cost3_Click()
    If Me.Cost3 = True Then
            Me.Cost4.Value = False
            Me.Cost5.Value = False
            Me.Cost2.Value = False
            Me.Cost1.Value = False
        End If
         
         
        If Me.Cost3 = False Then
            If Me.Cost4.Value = False Then
                If Me.Cost5.Value = False Then
                    If Me.Cost2.Value = False Then
                         If Me.Cost1.Value = False Then
                             Me.Cost3.Value = True
                        End If
                    End If
                End If
            End If
        End If
         
         
        Me.Requery
    End Sub
    
    Private Sub Cost4_Click()
    If Me.Cost4 = True Then
            Me.Cost5.Value = False
            Me.Cost3.Value = False
            Me.Cost2.Value = False
            Me.Cost1.Value = False
        End If
         
         
        If Me.Cost4 = False Then
            If Me.Cost5.Value = False Then
                If Me.Cost3.Value = False Then
                    If Me.Cost2.Value = False Then
                         If Me.Cost1.Value = False Then
                             Me.Cost4.Value = True
                        End If
                    End If
                End If
            End If
        End If
         
         
        Me.Requery
    End Sub
    
    Private Sub Cost5_Click()
    If Me.Cost5 = True Then
            Me.Cost4.Value = False
            Me.Cost3.Value = False
            Me.Cost2.Value = False
            Me.Cost1.Value = False
        End If
         
         
        If Me.Cost5 = False Then
            If Me.Cost4.Value = False Then
                If Me.Cost3.Value = False Then
                    If Me.Cost2.Value = False Then
                         If Me.Cost1.Value = False Then
                             Me.Cost5.Value = True
                        End If
                    End If
                End If
            End If
        End If
         
         
        Me.Requery
        
    End Sub
    
    Private Sub Overall1_Click()
    If Me.Overall1 = True Then
            Me.OVerall4.Value = False
            Me.Overall3.Value = False
            Me.Overall2.Value = False
            Me.Overall5.Value = False
        End If
         
         
        If Me.Overall1 = False Then
            If Me.OVerall4.Value = False Then
                If Me.Overall3.Value = False Then
                    If Me.Overall2.Value = False Then
                         If Me.Overall5.Value = False Then
                             Me.Overall1.Value = True
                        End If
                    End If
                End If
            End If
        End If
         
         
        Me.Requery
        
    End Sub
    
    Private Sub Overall2_Click()
    If Me.Overall2 = True Then
            Me.OVerall4.Value = False
            Me.Overall3.Value = False
            Me.Overall5.Value = False
            Me.Overall1.Value = False
        End If
         
         
        If Me.Overall2 = False Then
            If Me.OVerall4.Value = False Then
                If Me.Overall3.Value = False Then
                    If Me.Overall5.Value = False Then
                         If Me.Overall1.Value = False Then
                             Me.Overall2.Value = True
                        End If
                    End If
                End If
            End If
        End If
         
         
        Me.Requery
    End Sub
    
    Private Sub Overall3_Click()
    If Me.Overall3 = True Then
            Me.OVerall4.Value = False
            Me.Overall5.Value = False
            Me.Overall2.Value = False
            Me.Overall1.Value = False
        End If
         
         
        If Me.Overall3 = False Then
            If Me.OVerall4.Value = False Then
                If Me.Overall5.Value = False Then
                    If Me.Overall2.Value = False Then
                         If Me.Overall1.Value = False Then
                             Me.Overall3.Value = True
                        End If
                    End If
                End If
            End If
        End If
         
         
        Me.Requery
    End Sub
    
    Private Sub Overall4_Click()
    If Me.OVerall4 = True Then
            Me.Overall5.Value = False
            Me.Overall3.Value = False
            Me.Overall2.Value = False
            Me.Overall1.Value = False
        End If
         
         
        If Me.OVerall4 = False Then
            If Me.Overall5.Value = False Then
                If Me.Overall3.Value = False Then
                    If Me.Overall2.Value = False Then
                         If Me.Overall1.Value = False Then
                             Me.OVerall4.Value = True
                        End If
                    End If
                End If
            End If
        End If
         
         
        Me.Requery
    End Sub
    
    Private Sub Overall5_Click()
    If Me.Overall5 = True Then
            Me.OVerall4.Value = False
            Me.Overall3.Value = False
            Me.Overall2.Value = False
            Me.Overall1.Value = False
        End If
         
         
        If Me.Overall5 = False Then
            If Me.OVerall4.Value = False Then
                If Me.Overall3.Value = False Then
                    If Me.Overall2.Value = False Then
                         If Me.Overall1.Value = False Then
                             Me.Overall5.Value = True
                        End If
                    End If
                End If
            End If
        End If
         
         
        Me.Requery
        
    End Sub
    Private Sub Quality1_Click()
    If Me.Quality1 = True Then
            Me.Quality4.Value = False
            Me.Quality3.Value = False
            Me.Quality2.Value = False
            Me.Quality5.Value = False
        End If
         
         
        If Me.Quality1 = False Then
            If Me.Quality4.Value = False Then
                If Me.Quality3.Value = False Then
                    If Me.Quality2.Value = False Then
                         If Me.Quality5.Value = False Then
                             Me.Quality1.Value = True
                        End If
                    End If
                End If
            End If
        End If
         
         
        Me.Requery
    End Sub
    Private Sub Quality2_Click()
    If Me.Quality2 = True Then
            Me.Quality4.Value = False
            Me.Quality3.Value = False
            Me.Quality5.Value = False
            Me.Quality1.Value = False
        End If
         
         
        If Me.Quality2 = False Then
            If Me.Quality4.Value = False Then
                If Me.Quality3.Value = False Then
                    If Me.Quality5.Value = False Then
                         If Me.Quality1.Value = False Then
                             Me.Quality2.Value = True
                        End If
                    End If
                End If
            End If
        End If
         
         
        Me.Requery
    End Sub
    Private Sub Quality3_Click()
    If Me.Quality3 = True Then
            Me.Quality4.Value = False
            Me.Quality5.Value = False
            Me.Quality2.Value = False
            Me.Quality1.Value = False
        End If
         
         
        If Me.Quality3 = False Then
            If Me.Quality4.Value = False Then
                If Me.Quality5.Value = False Then
                    If Me.Quality2.Value = False Then
                         If Me.Quality1.Value = False Then
                             Me.Quality3.Value = True
                        End If
                    End If
                End If
            End If
        End If
         
         
        Me.Requery
    End Sub
    Private Sub Quality4_Click()
    If Me.Quality4 = True Then
            Me.Quality5.Value = False
            Me.Quality3.Value = False
            Me.Quality2.Value = False
            Me.Quality1.Value = False
        End If
         
         
        If Me.Quality4 = False Then
            If Me.Quality5.Value = False Then
                If Me.Quality3.Value = False Then
                    If Me.Quality2.Value = False Then
                         If Me.Quality1.Value = False Then
                             Me.Quality4.Value = True
                        End If
                    End If
                End If
            End If
        End If
         
         
        Me.Requery
    End Sub
    Private Sub Quality5_Click()
    If Me.Quality5 = True Then
            Me.Quality4.Value = False
            Me.Quality3.Value = False
            Me.Quality2.Value = False
            Me.Quality1.Value = False
        End If
         
         
        If Me.Quality5 = False Then
            If Me.Quality4.Value = False Then
                If Me.Quality3.Value = False Then
                    If Me.Quality2.Value = False Then
                         If Me.Quality1.Value = False Then
                             Me.Quality5.Value = True
                        End If
                    End If
                End If
            End If
        End If
         
         
        Me.Requery
    End Sub
    
    Private Sub Staff1_Click()
    If Me.Staff1 = True Then
            Me.Staff4.Value = False
            Me.Staff3.Value = False
            Me.Staff2.Value = False
            Me.Staff5.Value = False
        End If
         
         
        If Me.Staff1 = False Then
            If Me.Staff4.Value = False Then
                If Me.Staff3.Value = False Then
                    If Me.Staff2.Value = False Then
                         If Me.Staff5.Value = False Then
                             Me.Staff1.Value = True
                        End If
                    End If
                End If
            End If
        End If
         
         
        Me.Requery
        
    End Sub
    Private Sub Staff2_Click()
    If Me.Staff2 = True Then
            Me.Staff4.Value = False
            Me.Staff3.Value = False
            Me.Staff5.Value = False
            Me.Staff1.Value = False
        End If
         
         
        If Me.Staff2 = False Then
            If Me.Staff4.Value = False Then
                If Me.Staff3.Value = False Then
                    If Me.Staff5.Value = False Then
                         If Me.Staff1.Value = False Then
                             Me.Staff2.Value = True
                        End If
                    End If
                End If
            End If
        End If
         
         
        Me.Requery
        
    End Sub
    Private Sub Staff3_Click()
    If Me.Staff3 = True Then
            Me.Staff4.Value = False
            Me.Staff5.Value = False
            Me.Staff2.Value = False
            Me.Staff1.Value = False
        End If
         
         
        If Me.Staff3 = False Then
            If Me.Staff4.Value = False Then
                If Me.Staff5.Value = False Then
                    If Me.Staff2.Value = False Then
                         If Me.Staff1.Value = False Then
                             Me.Staff3.Value = True
                        End If
                    End If
                End If
            End If
        End If
         
         
        Me.Requery
        
    End Sub
    Private Sub Staff4_Click()
    If Me.Staff4 = True Then
            Me.Staff5.Value = False
            Me.Staff3.Value = False
            Me.Staff2.Value = False
            Me.Staff1.Value = False
        End If
         
         
        If Me.Staff4 = False Then
            If Me.Staff5.Value = False Then
                If Me.Staff3.Value = False Then
                    If Me.Staff2.Value = False Then
                         If Me.Staff1.Value = False Then
                             Me.Staff4.Value = True
                        End If
                    End If
                End If
            End If
        End If
         
         
        Me.Requery
        
    End Sub
    Private Sub Staff5_Click()
    If Me.Staff5 = True Then
            Me.Staff4.Value = False
            Me.Staff3.Value = False
            Me.Staff2.Value = False
            Me.Staff1.Value = False
        End If
         
         
        If Me.Staff5 = False Then
            If Me.Staff4.Value = False Then
                If Me.Staff3.Value = False Then
                    If Me.Staff2.Value = False Then
                         If Me.Staff1.Value = False Then
                             Me.Staff5.Value = True
                        End If
                    End If
                End If
            End If
        End If
         
         
        Me.Requery
        
    End Sub
    Private Sub Timeliness1_Click()
    If Me.Timeliness1 = True Then
            Me.Timeliness4.Value = False
            Me.Timeliness3.Value = False
            Me.Timeliness2.Value = False
            Me.Timeliness5.Value = False
        End If
         
         
        If Me.Timeliness1 = False Then
            If Me.Timeliness4.Value = False Then
                If Me.Timeliness3.Value = False Then
                    If Me.Timeliness2.Value = False Then
                         If Me.Timeliness5.Value = False Then
                             Me.Timeliness1.Value = True
                        End If
                    End If
                End If
            End If
        End If
         
         
        Me.Requery
    End Sub
    Private Sub Timeliness2_Click()
    If Me.Timeliness2 = True Then
            Me.Timeliness4.Value = False
            Me.Timeliness3.Value = False
            Me.Timeliness5.Value = False
            Me.Timeliness1.Value = False
        End If
         
         
        If Me.Timeliness2 = False Then
            If Me.Timeliness4.Value = False Then
                If Me.Timeliness3.Value = False Then
                    If Me.Timeliness5.Value = False Then
                         If Me.Timeliness1.Value = False Then
                             Me.Timeliness2.Value = True
                        End If
                    End If
                End If
            End If
        End If
         
         
        Me.Requery
    End Sub
    Private Sub Timeliness3_Click()
    If Me.Timeliness3 = True Then
            Me.Timeliness4.Value = False
            Me.Timeliness5.Value = False
            Me.Timeliness2.Value = False
            Me.Timeliness1.Value = False
        End If
         
         
        If Me.Timeliness3 = False Then
            If Me.Timeliness4.Value = False Then
                If Me.Timeliness5.Value = False Then
                    If Me.Timeliness2.Value = False Then
                         If Me.Timeliness1.Value = False Then
                             Me.Timeliness3.Value = True
                        End If
                    End If
                End If
            End If
        End If
         
         
        Me.Requery
    End Sub
    Private Sub Timeliness4_Click()
    If Me.Timeliness4 = True Then
            Me.Timeliness5.Value = False
            Me.Timeliness3.Value = False
            Me.Timeliness2.Value = False
            Me.Timeliness1.Value = False
        End If
         
         
        If Me.Timeliness4 = False Then
            If Me.Timeliness5.Value = False Then
                If Me.Timeliness3.Value = False Then
                    If Me.Timeliness2.Value = False Then
                         If Me.Timeliness1.Value = False Then
                             Me.Timeliness4.Value = True
                        End If
                    End If
                End If
            End If
        End If
         
         
        Me.Requery
    End Sub
    Private Sub Timeliness5_Click()
    If Me.Timeliness5 = True Then
            Me.Timeliness4.Value = False
            Me.Timeliness3.Value = False
            Me.Timeliness2.Value = False
            Me.Timeliness1.Value = False
        End If
         
         
        If Me.Timeliness5 = False Then
            If Me.Timeliness4.Value = False Then
                If Me.Timeliness3.Value = False Then
                    If Me.Timeliness2.Value = False Then
                         If Me.Timeliness1.Value = False Then
                             Me.Timeliness5.Value = True
                        End If
                    End If
                End If
            End If
        End If
         
         
        Me.Requery
    End Sub

  2. #2
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,018
    This type of error, usually but not associated with opening a Form, is apparently caused by all kinds of things, and, to the best of my knowledge, it is very seldom, if ever, actually connected with communicating with a OLE server or ActiveX Control, nor is it ever caused by the possible reasons given by the message!

    The most common cause, going by what I've seen online for the past seven years, has to do with using a non-English language with Access, and need to set the language for non-unicode programs to that foreign language. Here's a link explaining this:

    You receive an error message when you start Visual Basic for Applications code in an Access database

    Another link giving another a possible workaround:

    ACC2000: ActiveX Error When You Open a Database That Does Not Use ActiveX Controls

    Note that although these links give a specific Version of Windows and/or Access, the same problems persist over all combinations of Access and Windows.

    And always a possible solution, when things suddenly go phooey, for no apparent reason, is to create a new, blank Access file and Import everything into it.

    Linq ;0)>
    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  3. #3
    offie is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2013
    Posts
    176
    I just imported it into a new database, and now it works? I have no idea why

  4. #4
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,018
    Amazing how often that simply procedure works!

    Glad you got it working and that we could help!

    Linq ;0)>
    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

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

Similar Threads

  1. Replies: 1
    Last Post: 05-22-2013, 02:34 PM
  2. activex control (ado data control)
    By metokushika in forum Access
    Replies: 4
    Last Post: 11-07-2011, 12:45 AM
  3. Need an ActiveX control for folder browse
    By dbodell in forum Programming
    Replies: 4
    Last Post: 08-24-2011, 12:56 PM
  4. Replies: 1
    Last Post: 01-09-2011, 02:04 AM
  5. date picker activex control
    By mr2000 in forum Forms
    Replies: 1
    Last Post: 10-13-2010, 09:51 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