Custom XML ribbon not loading and Callback bombing out

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?
 
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?
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.

1648059467089.png
 

Attachments

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.
 
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.
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.
 
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.
 
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.
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.
 
Okay, it worked! What now?
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.
 
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.
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.
 
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.
 
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.
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.
 
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.
 
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.
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.
 
Thanks for your help. Do linked tables have to use dao?
 
Thanks for your help. Do linked tables have to use dao?
You use either ADO or DAO depending on your needs. You can use either of them on linked tables. Why?
 
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.
 
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.
Can you post an image showing the highlighted line?
 
Can you post an image showing the highlighted line?
'Callback for Form OnButtonPress
Public Function FrmButtonPress(ctl As IRibbonControl)

End Function
On Error GoTo FrmButtonPress_Err

DoCmd.OpenForm ctl.Tag

FrmButtonPress_Exit:
Exit Function

FrmButtonPress_Err:
MsgBox "Error:" & Err.Number & vbCrLf & Err.description, vbCritical, "Warning"
Resume FrmButtonPress_Exit

End Function
 
Attached is copy of the actual error message.
 

Attachments

  • Access Error.jpg
    Access Error.jpg
    71.3 KB · Views: 95

Users who are viewing this thread

Back
Top Bottom