Getting Access 2007's commands (1 Viewer)

beachldy

Registered User.
Local time
Today, 02:11
Joined
Jun 22, 2010
Messages
27
I am developing a customized ribbon for an Access 2007 project. The ribbon is designed but am not sure how to get the same commands that Access offers behind it's regular buttons. For example, if you customize the Quick Access toolbar and add the button for the "Filter By Form", I need to do that very same command/code behind my customized ribbon where I put "Filter by Form". Is there a listing of standard calls/code that is behind the MS Access standard buttons for tool bars? Things like "Print Preview" that get the current report dynamically, etc. There has to be code hidden somewhere or a command to call to get that same functionality as the standard buttons.
 

beachldy

Registered User.
Local time
Today, 02:11
Joined
Jun 22, 2010
Messages
27
As a follow up to elaborate, well, for example, on the code behind the button that says "Clear Filters", I put

DoCmd.RunCommand acCmdRemoveAllFilters

Then, I get an error " the command is not available now"...Frustrating to say the least. I'm just trying to figure out why the buttons that come standard with Access work ok by themselves, but when I try to call the same functions, I get errors. What am I missing?
 

boblarson

Smeghead
Local time
Yesterday, 23:11
Joined
Jan 12, 2001
Messages
32,059
Try this instead:

DoCmd.RunCommand acCmdRemoveFilterSort
 

Galaxiom

Super Moderator
Staff member
Local time
Today, 16:11
Joined
Jan 20, 2009
Messages
12,866
Not so much an answer to the question but I thought I would mention for anyone getting into ribbons. Try using this free tool:

http://ribboncustomizer.clatonh.com/Main.aspx

It isn't especially sophisticated but it is quite functional and a great introduction to making your own ribbons.
 

beachldy

Registered User.
Local time
Today, 02:11
Joined
Jun 22, 2010
Messages
27
The problem I'm running into is that the commands that I enter for the ribbon don't work like the "built-in commands" that come from adding the buttons onto the toolbar.

I wonder what the code is behind the toolbars? Is there a listing?
 

boblarson

Smeghead
Local time
Yesterday, 23:11
Joined
Jan 12, 2001
Messages
32,059
The problem I'm running into is that the commands that I enter for the ribbon don't work like the "built-in commands" that come from adding the buttons onto the toolbar.

I wonder what the code is behind the toolbars? Is there a listing?

Did you try my code? And for what it is worth, the RunCommands are basically duplicates of the menu and toolbar/ribbon items. So, if it isn't working the same then you didn't select the right one.
 

beachldy

Registered User.
Local time
Today, 02:11
Joined
Jun 22, 2010
Messages
27
Also a note, some of the commands are really named weird....Like the arrow icons on the ribbon that help users navigate through records. They start with "MailMerge", such as "MailMergeGoToFirstRecord". Mail merge? They work on the forms fine.
 

alexlds

Registered User.
Local time
Today, 07:11
Joined
May 28, 2012
Messages
71
Ive got exactly the same problem - Ive downloaded the AccessRibbonControls.xls but Im none the wiser - how do I use this info - presumably I somehow have to use the ordering and policy ID info???
 

alexlds

Registered User.
Local time
Today, 07:11
Joined
May 28, 2012
Messages
71
if some kind person would just give me the code behind the access ribbon buttons for "filter by form", "filter by selection" and "clear all filters" Id be a happy bunny . . . the wizard is worse than useless
 

Users who are viewing this thread

Top Bottom