Results 1 to 5 of 5
  1. #1
    Join Date
    Jul 2003
    Location
    Australia
    Posts
    217

    Question Unanswered: ActiveX component can't create objects ??

    When I ran a procedure , an error message appeared saying:

    "ActiveX component can't create objects".

    The offending statement is as follow:

    Set CDB = CurrentDB()

    (CDB was declared as database type)


    Does anybody know what is the cause of this weird error message ??

  2. #2
    Join Date
    Jun 2003
    Location
    Ahmedabad
    Posts
    6
    check references and add DAO 3.6 or 3.5 whichever is availble to you

  3. #3
    Join Date
    Jul 2003
    Location
    Australia
    Posts
    217

    Question Help

    Is that the reason ?

    But I have already chosen DAO 3.51 in the References dialog box.

    That error message appeared despite of that.

    Thank you very much in advance.

  4. #4
    Join Date
    Feb 2004
    Location
    Binary Universe
    Posts
    57
    I had the same error when I tried to assign a value or change properties of an array of list boxes on the main form from a pop up form.

    Solution was to declare an array variable on the pop form and assign it with values of list boxes of the main form:

    main form: frmMain
    Dim arrLists
    arrLists = Array(List1, List2) ' list box controls on the main form

    pop up form:
    Dim arrLists
    arrLists = Array(Forms!frmMain.List1, Forms!frmMain.List2)

    This allowed me to assign values to the main form's list boxes and manipulate their properties from a pop up form:

    arrLists(1).SetFocus
    arrLists(1).Visible = True
    arrLists(1).RowSource = " ... "
    arrLists(1).Requery etc...
    Last edited by The Byte; 02-14-04 at 02:18.
    I won't byte... hard!

  5. #5
    Join Date
    Jul 2003
    Location
    Australia
    Posts
    217

    Question

    Does anybody have any idea ??

Posting Permissions

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