Solved

Custom Ribbon Access 2013 question

Posted on 2015-02-03
2
350 Views
Last Modified: 2015-02-04
Hi EE

Using Ribbon creator I have created a customer ribbon when Open there is my custom ribbon. My question how do I get it to open a form asscociated with a button. In the basRibbonCallbacks there is the following section

'Button

Sub OnActionButton(control As IRibbonControl)
    ' Callbackname in XML File "onAction"

    ' Callback for event button click
    ' Callback fuer Button Click
   
    Select Case control.id
       
        Case Else
                DoCmd.OpenForm "frmDailyInspectionStart"
            'MsgBox "Button """ & control.id & """ clicked" & vbCrLf & _
                           '"Es wurde auf Button """ & control.id & """ im Ribbon geklickt", _
                           'vbInformation
    End Select

End Sub
I have used the docmd.openform  after the else statement so now I run the app and click a button that form opens which ever button I click. How do I link a button with a form. Control.ID ???

Any help appreciated

chestera
0
Comment
Question by:chestera
2 Comments
 
LVL 84

Accepted Solution

by:
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 500 total points
ID: 40588334
You would need to add Case statements for each control you want to handle. Ribbon Creater will do that for you, however, if you check the "Copy basRibbonCallbacks to the database", and "Replace basRibbonCallbacks in the Selected Database", and "Add SelectCase Statments for all Controls in basRibbonCallbacks". All of those are located on the Finish tab.

Note that if you do this, all work you may have done in basRibbonCallbacks will be erased, so be sure you have a backup before proceeding.

Once that basRibbonCallback is in your database, you then just go to the OnAction function, and write code in each Case statement.
0
 

Author Comment

by:chestera
ID: 40589639
Scott McDaniel

Thank you Scott

Alan
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

In Debugging – Part 1, you learned the basics of the debugging process. You learned how to avoid bugs, as well as how to utilize the Immediate window in the debugging process. This article takes things to the next level by showing you how you can us…
QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now