G
gthelin
I am trying to get callbacks to work with ribbon. Nothing I try seems to
work. I get the error message "Microsoft Office Access can't run the macro
or callback function 'onOpenForm'. I have added the Microsoft Office Objects
12.0 Library but it still does not work. I tried creating a small db and did
get it to work there. But in the db that I need it I just get the error
message.
Here is the XML:
<customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui">
<ribbon startFromScratch="false"> <tabs>
<tab id="tabMyStuff" label="MyStuff">
<group id="grpForms" label="Forms">
<button id="cmdOrders" label="Orders" onAction="onOpenForm"
tag="Orders" size="large"/>
<button id="cmdVendors" label="Orders2"
onAction="Ribbons.onOpenForm" tag="Orders" size="large"/>
</group>
<group id="grpReports" label="Reports">
<button id="cmdReports" label="Quote"
onAction="Ribbon.OpenfrmInvoice" size="large"/>
</group>
</tab>
</tabs>
</ribbon>
</customUI>
Here is the call back function (it is in a module called Ribbons).
Public Sub onOpenForm(ctl As IRibbonControl)
DoCmd.OpenForm ctl.Tag
End Sub
I tried to ref the callback in XML with the module name ribbons and with out
it. Nothing seems to work. Any thoughts?
work. I get the error message "Microsoft Office Access can't run the macro
or callback function 'onOpenForm'. I have added the Microsoft Office Objects
12.0 Library but it still does not work. I tried creating a small db and did
get it to work there. But in the db that I need it I just get the error
message.
Here is the XML:
<customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui">
<ribbon startFromScratch="false"> <tabs>
<tab id="tabMyStuff" label="MyStuff">
<group id="grpForms" label="Forms">
<button id="cmdOrders" label="Orders" onAction="onOpenForm"
tag="Orders" size="large"/>
<button id="cmdVendors" label="Orders2"
onAction="Ribbons.onOpenForm" tag="Orders" size="large"/>
</group>
<group id="grpReports" label="Reports">
<button id="cmdReports" label="Quote"
onAction="Ribbon.OpenfrmInvoice" size="large"/>
</group>
</tab>
</tabs>
</ribbon>
</customUI>
Here is the call back function (it is in a module called Ribbons).
Public Sub onOpenForm(ctl As IRibbonControl)
DoCmd.OpenForm ctl.Tag
End Sub
I tried to ref the callback in XML with the module name ribbons and with out
it. Nothing seems to work. Any thoughts?