Results 1 to 2 of 2
  1. #1
    MichaelA is offline Competent Performer
    Windows 10 Access 2013 64bit
    Join Date
    Sep 2019
    Location
    Wisconsin
    Posts
    139

    Custom Ribbon for accde

    I'm trying to create a custom ribbon for my accde file. I have some renaming to do but this is what I have so far. I works with the exception of this:

    <group id="dbCustomGroup3" label="Open Forms"> <button id="btnOpen" label="Open Home Form"
    onAction="=OpenMyForm('Navigation Form')"/>
    </group>

    When I try to open it, I get an error code "The expression you entered has a function name that Gradebook can't find"

    What is wrong with it? The whole code is below.

    <customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui">
    <ribbon startFromScratch="false">


    <tabs>
    <tab idMso="TabCreate" visible="false" />
    <tab id="dbCustomTab" label="A Custom Tab" visible="true">
    <group id="dbCustomGroup" label="Clipboard">
    <control idMso="Paste" label="Built-in Paste" enabled="true"/>
    </group>
    <group id="dbCustomGroup2" label="External Data">
    <control idMso="ImportExcel" label="Import from Excel" enabled="true"/>
    <control idMso="ExportExcel" label="Export to Excel" enabled="true"/>
    </group>
    <group id="dbCustomGroup3" label="Open Forms">
    <button id="btnOpen" label="Open Home Form"
    onAction="=OpenMyForm('Navigation Form')"/>
    </group>
    </tab>
    </tabs>
    </ribbon>
    </customUI>

    Thank you!

  2. #2
    Micron is offline Very Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,423
    Not an expert in ribbon xml but what I don't do is end a starting tag with a slash; e.g. <control idMso="Paste" label="Built-in Paste" enabled="true"> not
    <control idMso="Paste" label="Built-in Paste" enabled="true"/>
    Also have not tried to pass a parameter to a ribbon function as opposed to having the function call the appropriate procedure. Usually functions have parameters so that you can reuse them for every possible parameter value. If your called function only ever opens the same form, I'd get rid of the parameter.

    Perhaps it is as simple as the function call isn't spelled the same way as the function itself. I'd also make sure the form isn't the culprit as I have no idea what Gradebook is.
    EDIT - forgot to ask - if you're opening a main form for the application, why have a ribbon button for this as opposed to just loading the form on db opening?
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Applying a custom ribbon
    By Boltsie in forum Programming
    Replies: 5
    Last Post: 07-20-2018, 04:46 PM
  2. Custom Ribbon
    By June7 in forum Access
    Replies: 13
    Last Post: 08-01-2014, 02:44 AM
  3. custom Ribbon question
    By jscriptor09 in forum Access
    Replies: 0
    Last Post: 07-17-2012, 02:35 PM
  4. Custom Ribbon
    By nkuebelbeck in forum Programming
    Replies: 5
    Last Post: 08-25-2011, 11:55 AM
  5. Put an icon in a custom ribbon
    By ss3373 in forum Access
    Replies: 0
    Last Post: 06-21-2011, 05:52 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums