Just as a test, try the attached on that 2016 machine and let us know if you still get the same error, which was in the image you posted in Post #1.I located a computer that has Access 2016 on it. I did what you did and get the same error. What references are you using?
Okay, now that we know it works with 2016, try testing that sample file on a 2013 machine but first fix the missing reference by replacing it with the 15.0 object library. You should see one of the references (the 16.0 object) marked as "MISSING" when you open the sample file on a 2013 machine.It worked! We were supposed to migrate to 2016, but there is a lot of code changes that I can't do on my own before our August deadline. I am too green.
Well, just for this demo, I didn't load the entire module because it would require some updates due to the mix use of ADO and DAO code. At this point, we were just (or should I say "I was") trying to concentrate on the original error message you were asking about in your original question.I didn't see any real code in the module. How did the toolbar load? Very curious. I will let you know if the code works on the 2013 machine shortly.
Are you saying the original error message you posted in Post #1 is gone? If so, double check the Sub in your original db and make sure it is correct. I would suggest Compiling your Project, so you can fix any code error Access finds.Okay, it worked! What now?
Another test you can do is replace the original Sub from your actual db with something very simple, like the one I used, just to see if the error goes away.Are you saying the original error message you posted in Post #1 is gone? If so, double check the Sub in your original db and make sure it is correct. I would suggest Compiling your Project, so you can fix any code error Access finds.
To make the demo simple, and it's just for testing anyway, I only included the Sub for the FrmButtonPress. But, if you click on any of the Reports button, you will get the same error message.I didn't see any errors running the code you provided. I will attempt to try it in the original db. I still don't understand how the toolbar showed up with not code behidn it.
Unfortunately, the only other way we could help you at this point is to see your actual file. However, try what I said earlier and compile your project and fix any errors Access finds.Well, I put into my original db and my message is back. I have the correct references and I have compiled the database. No joy.
You use either ADO or DAO depending on your needs. You can use either of them on linked tables. Why?Thanks for your help. Do linked tables have to use dao?
Can you post an image showing the highlighted line?I finally have my toolbar loading. Unfortunately nothing works. The Public Function FrmButtonPress and RptButtonPress keep getting User-Defined type not defined error. I have been trying to research this issue, but nothing has worked. There is a lot of information out there! My references appear to be correct: Visual Basic For Applications, MS Access 15.0 Object Library, OLE Automation, MS ActiveX Data Objects 6.1 Library, MS Office 15.0 Access database engine object library, MS Excel 15.0 Object library, MS Word 15.0 Object library, MS VB for Applications Extensibility 5.3. Also, I am constantly being prompted for my DSN.
'Callback for Form OnButtonPressCan you post an image showing the highlighted line?
That image seems to indicate you don't have the proper Office Object Library selected.Attached is copy of the actual error message.