none
Adding reference to Access 2010 RRS feed

  • Question

  • Using Visual Studio 2010, I was able to use a reference to Access 2010.  Like so:

    Imports Access = Microsoft.Office.Interop.Access
    

    Now I'm using Visual Studio 2013 and need that reference to Access 2010.  I do not see that reference listed in the properties for my project.  The pc I'm using VS 2013 has Office 2013 installed. 

    Do I install the PIA's for Office 2010 as explained here?

    In the future, the reference may be changed to Access 2013, if my company decides to continue to use Access.  I do not see any references listed for Access 2013 in the properties of my project.  In VS 2010, the reference was called "Microsoft.Office.Interop.Access".  In VS 2013, I don't see it or anything that looks like it. 

    Do I need to install the PIA's for Office 2013 as well?  According to this response from Cindy Meister, the PIA's should have been installed when Office 2013 was installed.  I didn't do the installation so I'm not sure what to look for.

     

     


    Thanks.

    Thursday, January 2, 2014 4:57 PM

Answers

  • Hi EManning_dbweeb,

    There is no need to install PIAs separately. Did you have a chance to look at the COM references list in Visual Studio?

    Anyway, please take a look at the How To Automate Microsoft Access From Visual Basic .NET article. It describes all the required steps for automating Access. It looks like you need to add a reference to the Microsoft Access Object Library:

    • 1. On the Project menu, click Add Reference.
    • 2. On the COM tab, locate Microsoft Access 10.0 Object Library, and then click Select.
    • 3. Click OK in the Add References dialog box to accept your selections.

    • Marked as answer by db_dweeb Friday, January 3, 2014 2:33 PM
    Thursday, January 2, 2014 5:15 PM
  • Hi,

    >>Do I install the PIA's for Office 2010 as explained  here?<<

    Since you said you have Microsoft Office 2013 installed, you will find the Microsoft.Office.Interop.Access.dll 15.0 as followed when adding reference in your Visual Studio 2013 project. You don't need to install PIA for Office 2010 separately. 

    >>So I cannot reference Access 10.0 at all? <<

    Note that, the Microsoft Office 2013 is compatible with the older versions of Office. So if you add reference of Access 15.0 into the VS2013 project, it will work fine to operate Microsoft Offce 2010.

    If the Office 2010 has been installed, you could also add reference of Access 10.0.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.



    Friday, January 3, 2014 10:14 AM
    Moderator
  • Luna,

    It looks like you missed the following message above:

    >  I found the reference for Access 15.0 Object Library

    Also I have noticed the following text in your message:

    Note that, the Microsoft Office 2013 is compatible with the older versions of Office. So if you add reference of Access 15.0 into the VS2013 project, it will work fine to operate Microsoft Offce 2010.

    It will work until you try to use members introduced in later versions. So, PIAs provide such methods, but the host application not. You will get an exception in that case.

    • Marked as answer by db_dweeb Friday, January 3, 2014 2:33 PM
    Friday, January 3, 2014 10:41 AM

All replies

  • Hi EManning_dbweeb,

    There is no need to install PIAs separately. Did you have a chance to look at the COM references list in Visual Studio?

    Anyway, please take a look at the How To Automate Microsoft Access From Visual Basic .NET article. It describes all the required steps for automating Access. It looks like you need to add a reference to the Microsoft Access Object Library:

    • 1. On the Project menu, click Add Reference.
    • 2. On the COM tab, locate Microsoft Access 10.0 Object Library, and then click Select.
    • 3. Click OK in the Add References dialog box to accept your selections.

    • Marked as answer by db_dweeb Friday, January 3, 2014 2:33 PM
    Thursday, January 2, 2014 5:15 PM
  • Thanks.  I found the reference for Access 15.0 Object Library, but not 10.0.  Do I need to install the PIA's for 10.0?


    Thanks.

    Thursday, January 2, 2014 6:02 PM
  • No, you don't need to install anything. The number depends on the Office version you have installed on the PC. 15.0 corresponds to Office 2013.
    Thursday, January 2, 2014 7:21 PM
  • So I cannot reference Access 10.0 at all?  

    My company is made up of 2 companies.  Upgrades to Office happen sooner for one than for the other.  I've got a pc with Office 2010 and Framework 4.5.  The visual studio 2013 project runs Ok on this pc.

    The user of this project will more than likely use Office 2010 for some time.  So if I can, I'd like for them to use a VS 2013 project that can reference Access 2010.


    Thanks.

    Thursday, January 2, 2014 7:27 PM
  • Hi,

    >>Do I install the PIA's for Office 2010 as explained  here?<<

    Since you said you have Microsoft Office 2013 installed, you will find the Microsoft.Office.Interop.Access.dll 15.0 as followed when adding reference in your Visual Studio 2013 project. You don't need to install PIA for Office 2010 separately. 

    >>So I cannot reference Access 10.0 at all? <<

    Note that, the Microsoft Office 2013 is compatible with the older versions of Office. So if you add reference of Access 15.0 into the VS2013 project, it will work fine to operate Microsoft Offce 2010.

    If the Office 2010 has been installed, you could also add reference of Access 10.0.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.



    Friday, January 3, 2014 10:14 AM
    Moderator
  • Luna,

    It looks like you missed the following message above:

    >  I found the reference for Access 15.0 Object Library

    Also I have noticed the following text in your message:

    Note that, the Microsoft Office 2013 is compatible with the older versions of Office. So if you add reference of Access 15.0 into the VS2013 project, it will work fine to operate Microsoft Offce 2010.

    It will work until you try to use members introduced in later versions. So, PIAs provide such methods, but the host application not. You will get an exception in that case.

    • Marked as answer by db_dweeb Friday, January 3, 2014 2:33 PM
    Friday, January 3, 2014 10:41 AM
  • Thank you all for your replies.  I added the 15.0 reference and was able to use Access on a pc with Office 2010 and a pc with Office 2013.  

    Eugene, I'll keep your reply in mind in case that situation comes up.  For right now, all Access is used for is to print reports and give the user some freedom to create their own queries.  


    Thanks.

    Friday, January 3, 2014 2:37 PM