Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Custom Ribbon Access 2013 question

Posted on 2015-02-03
2
Medium Priority
?
388 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 2000 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

Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

Question has a verified solution.

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

Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
This article shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with …
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 …

670 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