Senin, 16 April 2018

Re: [MS_AccessPros] Runtime Error 429: ActiveX component can't create object

 

Duane,


I found the problem. Cylance Protect is blocking the script. I'll have to work with my corporate IT security people to allow an exception for this.


Thanks for your help troubleshooting the problem!


Doyce



---In MS_Access_Professionals@yahoogroups.com, <winberry.doyce@...> wrote :

Update: The Office repair completed but it did not fix the problem.


Doyce



---In MS_Access_Professionals@yahoogroups.com, <winberry.doyce@...> wrote :

Duane,


I actually have two of those checked. Version 2.8 and 6.0 multidimensional. I currently have the PC running an Office repair right now which takes 2-3 hours because my download speed is so slow. I tried my test_ADODB on another PC and it works fine there. Something about this PC or this Office install I'm thinking. However I do have this same problem on another new PC in my engineering department. It is Windows 7 though. I'm hoping the Office repair will fix it. If not, do you have any other ideas?


Doyce



---In MS_Access_Professionals@yahoogroups.com, <duanehookom@...> wrote :

Doyce,


I would try set a reference to the Microsoft ActiveX Dataobjects library.


Duane



From: MS_Access_Professionals@yahoogroups.com <MS_Access_Professionals@yahoogroups.com> on behalf of winberry.doyce@... [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com>
Sent: Monday, April 16, 2018 12:59 PM
To: MS_Access_Professionals@yahoogroups.com
Subject: Re: [MS_AccessPros] Runtime Error 429: ActiveX component can't create object
 


Duane,


I have all of these references checked and I copied this code into a new module and tested it. I'm getting the same runtime error with this test code. I have tried putting a copy of the database on my local hard drive and have verified that it is in a trusted folder.


Since that didn't work, I create a new database and copied the customers table from another db into it. I created a new module and pasted your test code into it. It gives the same error. Something else must be going on here. Do you have another suggestion? Should I try an Office repair?


Doyce



---In MS_Access_Professionals@yahoogroups.com, <duanehookom@...> wrote :

I'm on Windows 10 and Access 2016 with references set to 

-Visual Basic For Applications

-Microsoft Access 16.0 Object Library

-OLE Automation

-Microsoft Office 16.0 Access database engine Object Library


I copied the code to a standard module and simply changed the SQL statement and it worked as expected. 


I typically run as simple of code as I can to test. You might want to try create the following with a simple table:


Public Function TestADODB()
    Dim con As Object
    Dim rs As Object
    Dim stSql As String
    
    Set con = Application.CurrentProject.Connection
    stSql = "SELECT * FROM [Customers] "
    stSql = stSql & " WHERE [ID] < 10 "
    stSql = stSql & " ORDER BY [ID];"
    Set rs = CreateObject("ADODB.Recordset")
    rs.Open stSql, con, 1   ' 1 = adOpenKeyset
    With rs
        Do Until .EOF
            Debug.Print .Fields(0)
            .MoveNext
        Loop
        .Close
    End With    
    Set rs = Nothing
    Set con = Nothing
End Function

Regards,

Duane



From: MS_Access_Professionals@yahoogroups.com <MS_Access_Professionals@yahoogroups.com> on behalf of winberry.doyce@... [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com>
Sent: Monday, April 16, 2018 10:14 AM
To: MS_Access_Professionals@yahoogroups.com
Subject: Re: [MS_AccessPros] Runtime Error 429: ActiveX component can't create object
 


Hi Duane,


Thanks for responding. Yes, I complied the code. Debug-Compile. Here is the procedure where it is stopping. This is code that Access created with the switchboard.


Private Sub FillOptions()
' Fill in the options for this switchboard page.

    ' The number of buttons on the form.
    Const conNumButtons = 8
   
    Dim con As Object
    Dim rs As Object
    Dim stSql As String
    Dim intOption As Integer
   
    ' Set the focus to the first button on the form,
    ' and then hide all of the buttons on the form
    ' but the first.  You can't hide the field with the focus.
    Me![Option1].SetFocus
    For intOption = 2 To conNumButtons
        Me("Option" & intOption).Visible = False
        Me("OptionLabel" & intOption).Visible = False
    Next intOption
   
    ' Open the table of Switchboard Items, and find
    ' the first item for this Switchboard Page.
    Set con = Application.CurrentProject.Connection
    stSql = "SELECT * FROM [Switchboard Items]"
    stSql = stSql & " WHERE [ItemNumber] > 0 AND [SwitchboardID]=" & Me![SwitchboardID]
    stSql = stSql & " ORDER BY [ItemNumber];"
    Set rs = CreateObject("ADODB.Recordset")
    rs.Open stSql, con, 1   ' 1 = adOpenKeyset
   
    ' If there are no options for this Switchboard Page,
    ' display a message.  Otherwise, fill the page with the items.
    If (rs.EOF) Then
        Me![OptionLabel1].Caption = "There are no items for this switchboard page"
    Else
        While (Not (rs.EOF))
            Me("Option" & rs![ItemNumber]).Visible = True
            Me("OptionLabel" & rs![ItemNumber]).Visible = True
            Me("OptionLabel" & rs![ItemNumber]).Caption = rs![ItemText]
            rs.MoveNext
        Wend
    End If

    ' Close the recordset and the database.
    rs.Close
    Set rs = Nothing
    Set con = Nothing

End Sub


I also just opened a different database on this PC that is doing the same thing.


Doyce



---In MS_Access_Professionals@yahoogroups.com, <duanehookom@...> wrote :

Hi Doyce,


Can you share a little more code? I assume by "recompiled the database" you meant you compiled your code?


Regards,

Duane



From: MS_Access_Professionals@yahoogroups.com <MS_Access_Professionals@yahoogroups.com> on behalf of winberry.doyce@... [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com>
Sent: Monday, April 16, 2018 8:40 AM
To: MS_Access_Professionals@yahoogroups.com
Subject: [MS_AccessPros] Runtime Error 429: ActiveX component can't create object
 


Hello Friends,

I'm testing a new Windows 10 PC. All my others are Windows 7. I have one database that is throwing up a Run-time error 429 when opening and trying to load the switchboard. If I hit debug, it goes to this line on the switchboard form:

Set RS = CreateObject("ADODB.Recordset")

I've looked for missing references but can't find any. I've recompiled the database and tried a compact and repair. No luck. It opens fine on my Windows 7 PC using the same user login. What should I try next?

Doyce







__._,_.___

Posted by: winberry.doyce@con-way.com
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (9)

Have you tried the highest rated email app?
With 4.5 stars in iTunes, the Yahoo Mail app is the highest rated email app on the market. What are you waiting for? Now you can access all your inboxes (Gmail, Outlook, AOL and more) in one place. Never delete an email again with 1000GB of free cloud storage.


.

__,_._,___

Tidak ada komentar:

Posting Komentar