Access Developer 44
Customizing The Microsoft Access Ribbon, Part 1
Welcome
Today is part one of my series on building custom ribbons and menus. Today, we're going to talk about all kinds of different stuff, and I'm going to show you how to set up custom ribbons for your entire database, apply specific ribbons to individual forms, and swap them on the fly. We're going to learn about callback functions using built-in Access images, custom images, and tons of ribbon controls: check boxes, drop-down lists, combo boxes, and more.
Resources
Topics Covered
In Lesson 1, we're going to start learning how to build custom ribbons. We'll create the USysRibbons table, which is a hidden system table that will contain your ribbon data. We'll see how to build the ribbon XML, which is basically a text file that indicates what goes in the ribbon – the different groups and tabs and such. We'll learn how to apply a ribbon to an entire database, and how to build a ribbon just for a single specific form, like your customer form. Then, we'll learn how to swap the ribbons on the fly with VBA code. You can click a button or have an event that runs it and changes the ribbon.

In Lesson 2, we are continuing with custom ribbons. We're going to learn how to create buttons with our own custom functions within them. Instead of solely relying on built-in Access functions, such as Paste or Print, we'll be crafting our own unique buttons to perform our own specific actions. We'll explore the concept of callback functions. Furthermore, we'll discover how to use the built-in Access images, those small icons that come with Access. And, of course, we'll also explore using our own custom images. We'll cover the LoadPicture function, along with various properties including ControlTip Text (also known as supertip). We'll learn about label controls, dialog launchers (those tiny buttons at the bottom of a group), and sending parameters to our callback functions to open different forms with varying parameters. We'll even create a ribbon button to open the contacts for the current customer directly on the customer form.

In Lesson 3, we're going to build a Compact and Repair button right on our Ribbon Editor ribbon, so we don't have to keep switching back to the Database Tools ribbon. We're going to learn about the separator, the split button, toggle button, checkbox, edit button, dropdown, and combo box controls.

Enroll Today
Enroll now so that you watch these lessons, learn with us, post questions, and more!

Questions?
Please feel free to post your questions or comments below. If you are not sure as to whether or not this product will meet your needs, I'd rather help you before you buy it. Remember, all sales are final. Thank you.
Keywords
microsoft access, access 2016, access 2019, access 2021, access 365, ms access, #msaccess, #microsoftaccess, #help, #howto, #tutorial, #instruction, #learn, #lesson, #training, #database, Custom Ribbons, Ribbon Menus, Callback Functions, Ribbon Controls, Ribbon XML, Ribbon Buttons, Load Picture Function, Control Tip Text, Dialog Launchers, Separator, Split Button, Toggle Button, Checkbox, Edit Button, Dropdown, Combo Box.
Intro
In this lesson, we will begin exploring how to build custom ribbons and menus in Microsoft Access. I will show you how to set up custom ribbons for your entire database, apply specific ribbons to individual forms, and swap ribbons using VBA. We will talk about creating and managing the sysRibbons table, building ribbon XML, using callback functions, working with built-in Access images, and adding various ribbon controls like buttons, checkboxes, and drop-down lists. This class is designed for Access developers with some VBA experience and uses Microsoft 365, but most features go back to Access 2007. This is part 1.
Transcript
Today is part one of my series on building custom ribbons and menus.
Today we're going to talk about all kinds of different stuff, and I'm going to show you how to set up custom ribbons for your entire database, apply specific ribbons to individual forms, and swap them on the fly.
We're going to learn about callback functions, using built-in Access images, custom images, and tons of ribbon controls, checkboxes, drop down lists, and combo boxes. You name it. Lots of stuff today.
Of course, this is a developer-level class. However, the stuff that I'm teaching today really doesn't require that you have watched all the previous developer lessons, but definitely the Beginner and Expert series, the Advanced series, and at least Developer Level 1, so you've got some basic VBA under your belt. Of course, I always recommend don't skip levels.
This class was recorded using Microsoft 365. It's currently 2023, so I'm using the most current version. As far as I know, the stuff I'm covering today goes all the way back to Access 2007, which is when they introduced the ribbon. They've made some changes to it since then. If you're using 2007 or 2010, I'm not exactly sure that this stuff is going to work for you. It's been a while.
Of course, if you have questions, post them down below. Just scroll down to the bottom of the page you're watching this video on and post them right there.
Here's a detailed look at exactly what's covered in today's class.
In lesson one, we're going to begin learning how to build custom ribbons. We'll create the use-sys ribbons table, which is a hidden system table that will contain your ribbon data. We'll see how to build the ribbon XML, which is basically a text file that indicates what goes in the ribbon, the different groups, and tabs and such.
We'll learn how to apply a ribbon to an entire database, how to build a ribbon just for a single specific form like your customer form, and then we'll learn how to swap the ribbons on the fly with VBA code. You can click a button or have an event that runs that changes the ribbon.
In lesson two, we are continuing with custom ribbons. We're going to learn how to make buttons with our own custom functions in them, so instead of just having to use the built-in Access functions like cut, copy, paste, and that kind of stuff, we can make our own cool buttons that do our own cool thing.
We're going to learn about something called callback functions. We're going to learn how to use the built-in Access images, the little icons that come with Access. Then we're going to learn how to use our own custom images, like a picture of that handsome guy right there.
We'll learn about the load picture function, and then a bunch of different properties like control tip text, which is called super tip, and label controls. We'll learn about dialog launchers, those little tiny buttons at the bottom of a group. We'll learn how to send parameters to our callback functions to open different forms with different parameters, and we'll make a ribbon button to open the contacts for the current customer on the customer form. All that's in lesson two.
In lesson three, we are continuing on with custom ribbons. We're going to build a compact and repair button right on our ribbon editor ribbon so we don't have to keep switching back to the database tools ribbon.
We're going to learn about the separator, the split button, toggle button, checkbox, edit button, drop down, and combo box controls.
Quiz
Q1. What is the main focus of this video series? A. Creating custom forms in Access B. Building custom ribbons and menus C. Setting up user security in Access D. Importing data from Excel
Q2. Which feature allows you to display different ribbons in your database based on context? A. Custom queries B. Swapping ribbons on the fly with VBA code C. Using Access macros exclusively D. Database encryption
Q3. What is a "use-sys ribbons" table? A. A system table for storing user passwords B. A table that holds ribbon XML data for custom ribbons C. A table containing macro scripts only D. A table for storing image attachments
Q4. What is ribbon XML used for? A. Customizing Access themes B. Defining the structure and controls of ribbons C. Managing database relationships D. Designing report layouts
Q5. Which of the following is NOT mentioned as a ribbon control to be covered? A. Toggle button B. Combo box C. List box D. Separator
Q6. What are callback functions in the context of ribbons? A. Functions to automate database backups B. Functions called by ribbon controls to perform specific actions C. Functions for sending emails from Access D. Functions used for data import routines
Q7. What do dialog launchers do in a ribbon group? A. Open a pop-up window for additional options B. Change the theme of the database C. Minimize the ribbon D. Display tooltips for controls
Q8. Why should students have at least completed Developer Level 1 before taking this class? A. The class uses web programming techniques B. The class relies on knowledge of basic VBA C. The class requires SQL Server knowledge D. The class only works on MacOS
Q9. What is the recommended way to ask questions about the video content? A. Email the instructor directly B. Post questions below the video on the same page C. Submit a contact form on a different website D. Call customer support
Q10. What advantage does a custom compact and repair button on the ribbon provide? A. It secures the database automatically B. It avoids switching to the database tools ribbon C. It creates backup copies of the database D. It allows editing table data more easily
Answers: 1-B; 2-B; 3-B; 4-B; 5-C; 6-B; 7-A; 8-B; 9-B; 10-B
DISCLAIMER: Quiz questions are AI generated. If you find any that are wrong, don't make sense, or aren't related to the video topic at hand, then please post a comment and let me know. Thanks.
Summary
Today's video from Access Learning Zone is the first part in a series on building custom ribbons and menus in Microsoft Access.
In this lesson, I will guide you through a range of topics related to customizing the ribbon interface in your Access databases. Specifically, I will show you how to set up custom ribbons that can be applied to your entire database, assign specific ribbons to individual forms, and even change ribbons dynamically while your database is in use.
We will discuss callback functions and explore how to use both built-in Access images and your own custom images on ribbon buttons. I will also introduce you to many types of ribbon controls, including checkboxes, drop down lists, and combo boxes, ensuring you have a comprehensive understanding of what is possible.
While this is a developer-level class, you do not need to have completed all the previous developer lessons to follow along today. However, you should be familiar with the Beginner, Expert, Advanced series, and at least Developer Level 1, so you have some baseline VBA experience. I always recommend completing each level in order to build a solid foundation.
This class was recorded with Microsoft 365, so I am using the latest version as of 2023. The material I cover should be compatible with versions of Access dating back to 2007, when the ribbon was first introduced. However, if you are running older versions like 2007 or 2010, be aware that some features might not work exactly as shown since there have been changes to the ribbon system over the years.
If you have questions as you go through this material, do not hesitate to leave them at the bottom of the page where you are viewing this lesson.
Here is a more detailed breakdown of what we will cover today:
In lesson one, we will start by building custom ribbons from scratch. I will show you how to create a hidden system table called use-sys ribbons, which will store your ribbon data. You will learn how to construct the ribbon XML, which is the text file that describes what your ribbon will look like, including groups and tabs.
You will see how to assign a ribbon to your whole database and how to set up a ribbon just for one form, such as a customer form. I will explain how to swap ribbons on the fly using VBA, so you can change the ribbon through events or button clicks.
Lesson two will push custom ribbons further. You will learn to create buttons with your own custom VBA functions, so you are not limited to the built-in Access commands like cut or paste. I will introduce you to callback functions, show you how to incorporate both Access's built-in images and your own custom icons, and demonstrate how to use the load picture function. You will also learn about additional properties like control tip text, known as super tip, and various label controls. Dialog launchers, those small buttons in the corner of a ribbon group, will also be covered.
Importantly, you will see how to pass parameters to callback functions, letting you open different forms with different arguments. For example, we will create a ribbon button that opens up the contacts for the currently selected customer right from the customer form.
In lesson three, we will continue to expand your ribbon's features by adding a compact and repair button directly to your custom ribbon, eliminating the need to switch back to the standard database tools ribbon. You will also learn about several advanced ribbon controls including separators, split buttons, toggle buttons, checkboxes, edit buttons, drop downs, and combo boxes.
For a full video tutorial with step-by-step instructions on everything discussed in this article, please visit my website at the link below.
Live long and prosper, my friends.
Topic List
Creating and configuring the use-sys ribbons table Building ribbon XML for custom ribbons Applying a custom ribbon to the entire database Assigning a ribbon to a specific form Swapping ribbons dynamically with VBA code Adding buttons with custom VBA functions to the ribbon Implementing callback functions in ribbon controls Using built-in Access images in ribbon buttons Adding custom images to ribbon controls Utilizing the load picture function for images Setting control tip text (super tip) and labels on controls Adding and using dialog launcher buttons in groups Passing parameters to callback functions for dynamic actions Opening related forms via ribbon buttons with parameters Building a compact and repair button on a custom ribbon Using separator controls in ribbon groups Implementing split buttons in the ribbon Using toggle buttons on the custom ribbon Adding checkboxes to the ribbon Implementing edit box controls in the ribbon Adding drop down lists to ribbon groups Using combo box controls in custom ribbons
|