Solved

Custom Ribbon Access 2013 question

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

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

Enroll in July's Course of the Month

July's Course of the Month is now available! Enroll to learn HTML5 and prepare for certification. It's free for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

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

It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

630 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