Compile Error User Type Not Defined
Contents |
360 games PC games compile error user type not defined vba Windows games Windows phone games Entertainment All Entertainment
Compile Error User Defined Type Not Defined Excel
Movies & TV Music Business & Education Business Students & educators
Compile Error User Defined Type Not Defined Access
Developers Sale Sale Find a store Gift cards Products Software & services Windows Office Free downloads & security Internet
Compile Error User Defined Type Not Defined Outlook
Explorer Microsoft Edge Skype OneNote OneDrive Microsoft Health MSN Bing Microsoft Groove Microsoft Movies & TV Devices & Xbox All Microsoft devices Microsoft Surface All Windows PCs & tablets PC accessories Xbox & games Microsoft Lumia All compile error user defined type not defined outlook application Windows phones Microsoft HoloLens For business Cloud Platform Microsoft Azure Microsoft Dynamics Windows for business Office for business Skype for business Surface for business Enterprise solutions Small business solutions Find a solutions provider Volume Licensing For developers & IT pros Develop Windows apps Microsoft Azure MSDN TechNet Visual Studio For students & educators Office for students OneNote in classroom Shop PCs & tablets perfect for students Microsoft in Education Support Sign in Cart Cart Javascript is disabled Please enable javascript and refresh the page Cookies are disabled Please enable cookies and refresh the page CV: {{ getCv() }} English (United States) Terms of use Privacy & cookies Trademarks © 2016 Microsoft
360 games PC games compile error user defined type not defined vb6 Windows games Windows phone games Entertainment All Entertainment compile error user defined type not defined vb Movies & TV Music Business & Education Business Students & educators visual basic compile error user defined type not defined Developers Sale Sale Find a store Gift cards Products Software & services Windows Office Free downloads & security Internet https://support.microsoft.com/en-us/kb/289664 Explorer Microsoft Edge Skype OneNote OneDrive Microsoft Health MSN Bing Microsoft Groove Microsoft Movies & TV Devices & Xbox All Microsoft devices Microsoft Surface All Windows PCs & tablets PC accessories Xbox & games Microsoft Lumia All https://support.microsoft.com/en-us/kb/858611 Windows phones Microsoft HoloLens For business Cloud Platform Microsoft Azure Microsoft Dynamics Windows for business Office for business Skype for business Surface for business Enterprise solutions Small business solutions Find a solutions provider Volume Licensing For developers & IT pros Develop Windows apps Microsoft Azure MSDN TechNet Visual Studio For students & educators Office for students OneNote in classroom Shop PCs & tablets perfect for students Microsoft in Education Support Sign in Cart Cart Javascript is disabled Please enable javascript and refresh the page Cookies are disabled Please enable cookies and refresh the page CV: {{ getCv() }} English (United States) Terms of use Privacy & cookies Trademarks © 2016 Microsoft
User-defined type not defined By Jamie Czernik Articles about Microsoft Access If you are used to programming in Access 97 then you may encounter a problem if you upgrade to Access 2000 or higher and you http://www.cimaware.com/expert-zone/compile-error-in-access-userdefined-type-not-defined wish to continue to use the DAO object model in your VBA. If you try to run or compile your code you will probably be faced with the following error: "Compile error: User-defined type not defined" and you will notice that one of your DAO variables will be highlighted. Fortunately this is easily remedied. The problem here is that your database compile error does not have a reference set to the Microsoft DAO Object Library. With Access 97 this reference was already set by default, however Access 2000 and later versions have a reference set to the Microsoft ActiveX Data Objects Library instead. To set the necessary reference simply select Tools - References from the VBE code editor as shown in Figure 1. Figure 1 compile error user If you scroll down the list of available libraries then you will eventually find the Microsoft DAO 3.6 Library as shown in Figure 2. (Version 3.6 is the newest version available). All you have to do is check the box next to this library and click on the OK button. You should now be able to compile your code by selecting Debug - Compile from the main menu. Figure 2 Occasionally the problem might be that Access is unable to locate the reference, which will be indicated by the word "Missing" shown next to the reference location. If this is the case then uncheck the reference and close the references dialog. Next, open the references dialog again, locate the library from the list and re-check the reference that was missing. While on the subject, it is also good practice to refer explicitly to your DAO variables with the term "DAO." as shown in the example function below, incase you decide to add ADO code to your database later on (this is known as disambiguation - and is shown in the following example). '----------------------