CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4

Thread: VBA/Access 2000

  1. #1
    Join Date
    Aug 2000
    Location
    South Africa
    Posts
    195

    VBA/Access 2000

    hi there

    I've written a Access App. Now I want to take that same app on a users PC and Split it via database splitter. If I attempt that I get message "ActiveX component can't create object"

    What on earth does this mean? The user has got a complete installation (including wizards) on his PC and a legal (YES!) version of Access

    Any ideas?

    thanks



  2. #2
    Join Date
    Apr 2001
    Location
    Spain
    Posts
    28

    Re: VBA/Access 2000

    This is because you used an ActiveX Control that is not installed on the other PC. The ActiveX Controls are saved in the Windows/System dir as .ocx or .dll. I had the same problem with the progress bar I used in an Access Programm installed on Win NT and on another PC with Win 98 it doesn't worked because there was another Version of the progress bar installed.

    regards. PAUL


  3. #3
    Join Date
    May 2000
    Location
    New York, NY, USA
    Posts
    2,878

    Re: VBA/Access 2000

    Error 429 ActiveX component can't create object. CAUSE

    ACTIVEX CAN'T CREATE WHICH OBJECT?
    When working on a large VB application that uses hundreds of COM objects, the "429 can't
    create object" error doesn't give you much help in determining which object could not be created.
    You can get around this limitation by writing a function to wrap the VB runtime CreateObject
    function:

    Public Function CreateObject(sProgID as string) _
    as object
    On Error Goto CreateErr

    ' Call the VB runtime CreateObject function
    Set CreateObject = VBA.CreateObject(sProgId)

    Exit Function
    CreateErr:
    ' return the error with the name of the object
    'that could not be created
    Err.Raise Err.Number, _
    "CreateObject Wrapper", Err.Description & _
    ": '" & sProgID & "'"
    End Function

    With this wrapper function, you get the 429 error and the name of the object that could not be
    created.
    '============================================================================
    This problem happens when you use an ActiveX control in your program and the ActiveX control is not
    registered in the registry. If it works on the Development PC, it must be an incompatibillity between your
    control and the same control installed in the user PC. To fix this check which ActiveX controls you need in
    order to run your program and make sure all of them are placed in the SYSTEM folder. You should know which
    control is the one that's giving you so much trouble (it must be in the Form that crashes your program) so
    you'll have to manually register it. To do it you have two basic choices: Do it through Windows Explorer or
    through a DOS Prompt Window. If you are using the Explorer just drag and drop your
    control into REGSVR32.EXE (Both must be in the SYSTEM folder) or
    in the Dos Prompt window be sure you are in the SYSTEM folder
    and tye REGSVR32 [YourControlName].OCX After doing this you
    should see a message box saying that the registration process
    succeeded. If it fails, then you will have to dig inside the
    registry and find all the keys that references the control to
    delete them. Then you'll have to repeat the registration
    process.

    '============================================================================
    Error 429 means that there is a component that isn't correctly registered. The PDW is supposed to take care
    of this, but sometimes it forgets. I doubt its an ADO component, just because since it is referenced in
    different ways so the PDW couldn't overlook it. Does your project have any custom controls or DLLs that
    were written by you or your company. These it may not pick up and register properly. If you find that this
    problem is only occurring on one machine, see if you can manually register the suspected controls by going
    to the start-run menu and typing "regsvr32 <dll or ocx path and name>". if it still doesn't work - look into
    rebuilding the setup package with the PDW and examine every option and/or another setup packager
    (Wise or Install Shield).

    '=============================================================================

    Here's another clue:
    You are refrencing an ado library that is the latest and geratest on your machine but when you try
    to package the exe PDW by dafault picks up from its own repository of redistribution components which
    normally has a version which is older.
    So what happens the PDW picks up the ADO library all right automatically based on the Reference setting in
    your project but it picks up the older version.
    If this is the case then
    For this replace the Mdac_typ.exe in the
    C:\Program Files\Microsoft Visual Studio\VB98\Wizards\PDWizard\Redist with the latest Mdac_typ.exe


    '============================================================================
    'check this
    Goto Project|References from the vb menu. Look for a ActiveX control that has MISSING next to it.
    If you see a missing that's the problem. It can't find it. Sometimes it is a activeX version problem, you may
    just need to pick a different version of the missing ActiveX control. Ot you may need to somehow install
    the missing control or not use it. As for where the debugger shows the problem, it's a red herring, just look
    for the MISSING control in references.




    Iouri Boutchkine
    [email protected]
    Iouri Boutchkine
    [email protected]

  4. #4
    Join Date
    Aug 2000
    Location
    South Africa
    Posts
    195

    Re: VBA/Access 2000

    Thanks for the extensive info Iouri, but where do I type in this function - General Declaration? Also - how do I invoke it?

    Thanks stax


Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured