Results 1 to 6 of 6
  1. #1
    Abacus1234 is offline Competent Performer
    Windows 8 Access 2013 32bit
    Join Date
    Nov 2011
    Posts
    212

    Error 2770 when opening a form


    Getting this message when opening a form, "The object you referenced in the Visual Basic Procedure as an OLE object isn't an OLE Object". I can go ahead and use the form. I have looked at all the code behind the form, and the Oncurrent macro and cannot find any errors. or can I stop the message with warning on and warning off.

    Any input would be a great help. Thanks.

  2. #2
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 8 Access 2013
    Join Date
    Aug 2013
    Posts
    7,862
    I think this sometimes happens when an Active X driver is no longer available on a machine or there needs to be an update on the registry.

    I suggest sending Missinglinq a PM and providing a link to this thread, asking him if he is willing to help.

  3. #3
    Abacus1234 is offline Competent Performer
    Windows 8 Access 2013 32bit
    Join Date
    Nov 2011
    Posts
    212
    I sent the PM as you suggested, but haven't heard back yet.

    I found this article on libraries, how to unregister and reregister http://allenbrowne.com/ser-38.html I did that with DAo360.dll. My database is in .mdb format, so I'm not sure if the references need acedao.dll

    I'm still seeing the message "The object you referenced in the Visual Basic Procedure as an OLE object isn't an OLE Object".

  4. #4
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 8 Access 2013
    Join Date
    Aug 2013
    Posts
    7,862
    OK,

    • Are than any OLE fields in any tables?
    • Do you have an OLE control in any forms? Maybe a form has a control that looks at a picture file, PDF, or CAD file that is stored on a hard drive.
    • If it is only happening on one form, can you post the VBA for that form here?


    I have meetings the rest of today and may not be able to get back to this until much later. I am sorry Linq is unavailable. I remember him having insight to this matter that I had not previously considered.

  5. #5
    Abacus1234 is offline Competent Performer
    Windows 8 Access 2013 32bit
    Join Date
    Nov 2011
    Posts
    212
    Further investigation suggests that perhaps the subform was causing the message. I pulled in an existing form to use as a subform. I changed the design of the subform, but it did not change the design of the existing form that I pulled in. When I found a way to save the existing form to match the changes I had made while it was a subform, the messag went away. I found this out after importing fhe form into another database, and them rebuilding the form. I'll keep working on it now as I have much more work to do in this form. I will also try importing the rebuilt form into the original database and see if it works without the message. Thanks for support, it helps a great deal.




    No OLE fields in any tables
    No OLE controls on any forms

    The form it is happening on has a subform. The master form has no code, the subform code is posted here.


    I took all the code out, and still got the message.

    I pulled all objects into a new database, and still got the message. Thanks

    [CODEOption Compare Database
    Private Sub Combo11_AfterUpdate()
    Me.SectionNumber = Me.Combo11.Column(2)
    End Sub
    Private Sub Combo11_NotInList(NewData As String, Response AsInteger)
    ' Enables the user to add a new item by typing the item namein the combo box.

    Const ItemDes$ ="Entry for Combo11"
    Const TableName$ ="TServices"
    Const FieldName$ ="Description"

    Dim CurrentDatabaseAs Database
    Dim CurrentTable AsRecordset

    Dim NewItem%,Title$, MsgDialog%

    Const MB_YESNO = 4
    ConstMB_ICONEXCLAMATION = 48
    ConstMB_DEFBUTTON1 = 0, IDYES = 6, IDNO = 7
    Const CLR_WHITE =16777215
    Const NORMAL = 1

    ' Display a message box asking if the user wants to add anew item.
    'Title = ItemDes$+ " Not in List"
    ' MsgDialog = MB_YESNO+ MB_ICONEXCLAMATION + MB_DEFBUTTON1
    ' If Not(IsNull(NewData)) And (NewData <> "") Then
    ' NewItem% = MsgBox(NewData & " isnot in the list. Do you want to add a new " & ItemDes$ &"?", MsgDialog, Title)
    ' Else
    ' NewItem% = IDNO 'Invalid new data. Don't add.
    ' End If

    NewItem% = IDYES
    'Add the newvalue to the table

    'On Error ResumeNext 'Disable error messages

    'Open the Table
    SetCurrentDatabase = DBEngine.Workspaces(0).Databases(0) 'Get current database

    Set CurrentTable= CurrentDatabase.OpenRecordset(TableName$, DB_OPEN_TABLE)

    CurrentTable.AddNew 'Create newrecord
    CurrentTable(FieldName$) = NewData
    CurrentTable.Update 'Commitaddition
    CurrentTable.Close
    Err = 0

    '[CreditCardType].Requery
    Response =DATA_ERRADDED


    ' Continue withoutdisplaying default error message.
    'End If



    End Sub

    Private Sub Combo21_NotInList(NewData As String, Response AsInteger)
    ' Enables the user to add a new item by typing the item namein the combo box.

    Const ItemDes$ ="Entry for cOMBO21"
    Const TableName$ ="TTo"
    Const FieldName$ ="Description"

    Dim CurrentDatabaseAs Database
    Dim CurrentTable AsRecordset

    Dim NewItem%,Title$, MsgDialog%

    Const MB_YESNO = 4
    ConstMB_ICONEXCLAMATION = 48
    ConstMB_DEFBUTTON1 = 0, IDYES = 6, IDNO = 7
    Const CLR_WHITE =16777215
    Const NORMAL = 1

    ' Display a message box asking if the user wants to add anew item.
    'Title = ItemDes$+ " Not in List"
    ' MsgDialog =MB_YESNO + MB_ICONEXCLAMATION + MB_DEFBUTTON1
    ' If Not(IsNull(NewData)) And (NewData <> "") Then
    ' NewItem% = MsgBox(NewData & " isnot in the list. Do you want to add a new " & ItemDes$ &"?", MsgDialog, Title)
    ' Else
    ' NewItem% = IDNO 'Invalid new data. Don't add.
    ' End If

    NewItem% = IDYES
    'Add the newvalue to the table

    'On Error ResumeNext 'Disable error messages

    'Open the Table
    Set CurrentDatabase= DBEngine.Workspaces(0).Databases(0) 'Get current database

    Set CurrentTable= CurrentDatabase.OpenRecordset(TableName$, DB_OPEN_TABLE)

    CurrentTable.AddNew 'Create newrecord
    CurrentTable(FieldName$) = NewData
    CurrentTable.Update 'Commit addition
    CurrentTable.Close
    Err = 0

    '[CreditCardType].Requery
    Response =DATA_ERRADDED


    ' Continue withoutdisplaying default error message.
    'End If

    End Sub





    ][/CODE]
    Last edited by Abacus1234; 08-27-2016 at 01:01 PM.

  6. #6
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 8 Access 2013
    Join Date
    Aug 2013
    Posts
    7,862
    OK, your Not In List code might benefit from some newer techniques.

    What makes the most sense is your database's system tables got corrupt with respect to the Form object associated with your Subform Control.

    Perhaps you made some changes to some of the code while in debug mode and then saved the form object via the VBA editor. It should not be a big deal to edit the form object that is contained within the subform control while in Design View of the Main Form. In other words, select the subform control and then select the object within in order to edit the design of that object.

    When I edit the VBA of a form object that is the control source of a subform control, I will close the mainform object and then open the subform in design view from the navigation pane

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

Similar Threads

  1. Replies: 5
    Last Post: 01-24-2015, 12:59 AM
  2. Replies: 7
    Last Post: 06-28-2012, 02:05 PM
  3. Weird Error on opening a form
    By RayMilhon in forum Forms
    Replies: 1
    Last Post: 01-10-2012, 05:44 PM
  4. Replies: 3
    Last Post: 07-13-2011, 02:04 PM
  5. Error In Opening Form
    By cwwaicw311 in forum Forms
    Replies: 1
    Last Post: 03-10-2010, 09:18 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