Solved

Custom Ribbon Access 2013 question

Posted on 2015-02-03
2
361 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

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction When developing Access applications, often we need to know whether an object exists.  This article presents a quick and reliable routine to determine if an object exists without that object being opened. If you wanted to inspect/ite…
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…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

773 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