Solved

Custom Ribbon Access 2013 question

Posted on 2015-02-03
2
368 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Phishing attempts can come in all forms, shapes and sizes. No matter how familiar you think you are with them, always remember to take extra precaution when opening an email with attachments or links.
AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

740 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