Results 1 to 3 of 3
  1. #1
    10Tec is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Nov 2011
    Posts
    2

    MS Access 2003/2007/2010: Error 97 "Can not call friend function..." and "There is no

    We are a company that develops and sells shareware ActiveX and .NET controls for other developers (see www.10Tec.com), and several customers reported a very strange problem with our ActiveX grid control, iGrid, in recent versions of MS Access - 2003/2007/2010.

    The most strange point is that the problem occurs on a random unpredictable stage when working with an MS Access form that contains our iGrid control. After you open the form next time in design view or form view, you see a blank control container for the iGrid ActiveX and you get the "There is no object in this control" error message. As a result of this problem, you may also get

    Run-time error '97':
    Can not call friend function on object which is not an instance of defining class.

    It looks like the form becomes corrupted after some actions of the developer.

    This problem has never occurred in other development environments including Visual Basic 6 or even UserForms in Ms Word/Excel VBA, but from time to time this happens in MS Access. Sometimes even MS Access freezes when you open the problem form, and you need to terminate the process thru CTRL+ALT+DEL.

    We tried to find a sequence of actions which can lead to the problem for sure, but we have not managed to do that. The only thing which may accompany the appearance of this problem is the following. If you refers a non-existing form control in your code, and you encounter this error while debugging your form (most likely, the compiler option "Compile On Demand" should be set for that), the form became corrupted when you hit the "Reset" button on the toolbar in the VBA environment.

    If you even do not know how to overcome this problem, but at least know how to repair the problem form - write your recipe, please. Maybe, there is also a tool to repair this automatically.

    We cannot reproduce the problem in a brand new form from scratch, but we have a problem mdb file. It is attached (though you might need to install iGrid ActiveX also).



    Sure, this is not a problem of an unregistered ActiveX control. The problem occurs when the control is properly registered in the Windows registry.

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,820
    I have never used custom controls. I get error messages when I try to open the form in either Design or Form view "The form name 'Subform_Kennzahlen_Sichtbar' is misspelled or refers to a form that doesn't exist." Also, for Form view get 'The expression On Load you entered as the event property setting produced the following error: User-defined type not defined.'; 'The expression On Resize you entered as the event property setting produced the following error: User-defined type not defined.'; 'The expression MouseMove you entered as the event property setting produced the following error: User-defined type not defined.

    Even after commenting code (can't find MouseMove code), error messages still present.

    Controls have German? text. Don't know what they do.

    I can fix the subform issue but what about the 'type not defined'?

    Sorry, can't debug.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    10Tec is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Nov 2011
    Posts
    2
    Quote Originally Posted by June7 View Post
    I can fix the subform issue but what about the 'type not defined'?
    That's why we wrote you may need iGrid ActiveX installed.

    Quote Originally Posted by June7 View Post
    Sorry, can't debug.
    It cannot be debugged as it is a problem inside the "visual" part of the form. The question is how to fix that when it happened, or why does this happen at all?

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

Similar Threads

  1. Replies: 1
    Last Post: 06-23-2011, 07:19 AM
  2. Replies: 2
    Last Post: 06-18-2011, 09:55 AM
  3. Silly error on a simple function call - help
    By allenjasonbrown@gmail.com in forum Programming
    Replies: 5
    Last Post: 06-10-2011, 01:23 PM
  4. 2003 to 2007 conversion error
    By paleoman in forum Access
    Replies: 1
    Last Post: 06-22-2010, 04:33 PM
  5. Replies: 0
    Last Post: 05-07-2009, 02:32 PM

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