Results 1 to 6 of 6
  1. #1
    Rdiamond is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Dec 2015
    Posts
    4

    Can't add a reference to the specified file.

    I am working on converting an old Access 97 application so that it can work with Access 2013. I am able to convert the database file; the problem is that the original database had a customized add-in file (.mda). This add-in file includes functions and variables referenced in the application (I opened the .mda file in a text editor; I found the function and variable names mixed with lots of unreadable control characters). After converting the database, I cannot create a reference to the add-in file - it says 'Can't add a reference to the specified file.'
    I have tried this using Access 2003, 2007 and 2013. I tried de-compiling, compact/repair and then compiling the application in Access 97 before converting; I also tried creating a new database in Access 2003 and then importing all the tables, queries, forms, and modules. Any assistance would be greatly appreciated!

  2. #2
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 8 Access 2013
    Join Date
    Aug 2013
    Posts
    7,862
    Quote Originally Posted by Rdiamond View Post
    ...This add-in file includes functions and variables referenced in the application...
    Why do you believe the references are to the MDA file? What is the name of the MDA file?

    I am not pretending to know the solution to your problem. However, I understand this file to be a system file for Access. What I would do is use the Access 2003 wizard to import one or more of the objects from a copy (a Right Click Paste copy) of the original file. In the wizard, I would use the advanced options to "Import Saved Import Procedures" or something like that. I can't remember the exact words. So, what I am trying to say is, use the Wizard's advanced options to import Black Box stuff.

  3. #3
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,891
    Did you create the add-in and the mda file?

    I have used only one 3rd-party add-in (Rick Fisher's Find and Replace). AFAIK, there is no mda/accda file involved as it is not application specific (I think that means a single database).

    Review http://www.databasedev.co.uk/access-add-ins.html
    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.

  4. #4
    HiTechCoach's Avatar
    HiTechCoach is offline MS MVP - Access Expert
    Windows 8 Access 2013
    Join Date
    Jul 2010
    Location
    Oklahoma, USA
    Posts
    702

  5. #5
    Rdiamond is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Dec 2015
    Posts
    4

    Question Access 2013 error with subform properties

    Quote Originally Posted by ItsMe View Post
    Why do you believe the references are to the MDA file? What is the name of the MDA file?...

    What I would do is use the Access 2003 wizard to import one or more of the objects from a copy (a Right Click Paste copy) of the original file. In the wizard, I would use the advanced options to "Import Saved Procedures"...
    Thanks! The MDA file (jdate8HOS.mda) was clearly shown in the references; importing the procedures from this file definitely helped.
    There were several other issues I fixed - security, syntax errors, converting macros to VBA, etc.
    So, now it works perfectly in Access 2007. However, when I try to open it in Access 2013, I get "error 2467, The expression you entered refers to an object that is closed or doesn't exist."

    The error occurs on this line of code:
    Code:
    SH = Me.Subform0.Height / Me.Subform0.Form.Section(0).Height
    Right below that is this line:
    Code:
    SW = Me.Subform0.Width / Me.Subform0.Form.Width
    When I mouse over 'Me.Subform0.Width' (after the error), it shows 'Me.Subform0.Width = 8206'

    Going back to Access 2007 (same database file, same directory), adding a breakpoint shows the same value for 'Me.Subform0.Width', and values for the other 3 properties:
    Me.Subform0.Height = 5276, Me.Subform0.Form.Section(0).Height = 4755, and Me.Subform0.Form.Width = 10860.

    So Access 2013 is doing something different in processing these lines, which causes the error. Any ideas how to fix?

  6. #6
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 8 Access 2013
    Join Date
    Aug 2013
    Posts
    7,862
    I suspect the reason you are getting different values in different versions for the Height and Width is because the number of TWIPS are different on the two different computers. I do not see anything wrong with the code. The fact that you are getting values for the subform object's properties indicate there is not a problem with the subform missing or using an incorrect/misspelled name. So that leaves the variable SH. Again, I do not see an issue with assigning a value to SH.

    Having said that, if a complex data type is missing code to instantiate it, you will have an issue assigning a value to it. Post the declaration of SH. Was it declared as a long integer? So I would also make sure the VBA code is 'Compiled' via the VBA editor's Debug>Compile Database. Make the determination of whether the error you are receiving is a compilation error or a run time exception.

    Beyond all of that, you might have a corrupt subform control/container. I would, using Access 2013 and a copy of the Application, make note of the control source of the subform control and the name and delete the subform control. Then I would do a compact and repair. Then I would add a new subform control to the form. I would name the subform control something different than its previous name. Add the form object back to the new control's control source. Fix the VBA to reflect the new name of the subform control, do a Compile Database, save the project, and then a compact and repair. Then try running the app again.

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

Similar Threads

  1. Replies: 2
    Last Post: 01-13-2015, 07:16 AM
  2. Replies: 13
    Last Post: 12-12-2013, 07:22 PM
  3. MU File Reference Library
    By dandoescode in forum Access
    Replies: 17
    Last Post: 06-20-2012, 12:40 PM
  4. Replies: 1
    Last Post: 03-23-2012, 12:15 PM
  5. Replies: 10
    Last Post: 03-04-2012, 12:17 AM

Tags for this Thread

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