Access 2007 Ribbon - FileExit

G

Guest

Hi All,

I am having a problem repurposing the Office Menu - Access Exit button?

The following XML statement to hide the button doesn't appear to work:

<button idMso="FileExit" visible="false"/>

whilst the following:

button idMso="FileExit"/>

creates a new button.

The "FileExit" idMso also doesn't appear as a control name in the
AccessRibbonControls.xlsx

Can anyone help?

Your assistance appreciated
Guy
 
A

Albert D. Kallal

Two things:

1) by default, the FileExit command is NOT visible in the list of options
the office button
(note how I said "list")

2) by default, the access options is NOT visible on the office button.

Remember we are talking about the OPTIONS THAT LIST on the left side.

There are also two buttons on the low right of the office dialog:

Those two buttons are NOT part of the ribbon customizations allowed.

The following ribbon will much explain this:


<customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui">
<ribbon startFromScratch="false">
<officeMenu>
<button idMso="FileExit" enabled="false"/>
<button idMso="ApplicationOptionsDialog" enabled="false"/>
</officeMenu>
</ribbon>
</customUI>

Remember, the "list" of buttons that you customize in the office button are
only those on the left side. The two buttons that appear in the lower right
of the office button are not customizable, and are NOT part of the buttions
(at least as far as I know). (those two buttons are Access Options, and Exit
access).

So, if you run the above ribbon, you see the two options now appear in the
left side..and they will be disabled.

I have to check further on this, as it kind of REALLY rotten if we can't
remove those two buttons to the right, but it sure looks that way right
now...
 
A

Albert D. Kallal

Note that I would NEVER want to remove the "exit" button anyway. So, I happy
with that decision. If users get stuck in your application, then they simply
will do a ctorl-alt-del and kill it in the task manager. So, I would ALWAYS
give them that free exit to get out in with peace of mind and ease.

However, the access options dialog is a different storey, and we should be
able to EASILY hide that button, and I can't seem to accomplish that.

The only way right now I know to get rid of the access options button on the
lower right is to launch application with the /runtime switch (use a
shortcut). Then the access options dialog button is NOT displayed.

I see what else i can come up with here....
 
A

Albert D. Kallal

However, the access options dialog is a different storey, and we should be
able to EASILY hide that button, and I can't seem to accomplish that.


Ah ok...found a solution...

....here what you do.

Just simply un-check "allow full menus" in the start-up options for the
current database.

If you do the above, then you not see the access options button (in fact,
you don't even need to customize).

So, at this point...I quite happy.

remember, even if you did disable the exit access, there would still be the
"x" in the upper right hand corner, and further I used alt-f4 to close
applications on my note book for about 10+ years now. So, really, removing
the exit button is totally moot...and really accomplishes nothing.

However, I quite thrilled that simply un-checking the above box will remove
the display of the access options button....
 
G

Guest

Hi Albert,

Good to hear from you again.

The reason I would like to repurpose the Access Exit button (the button at
the bottom of the Office menu) is that I need to control how the application
shuts down so that all resources are released properly.

For instance I use a third-party licensing application and need to make
calls to release the license before exiting. I also use a hidden form that
contains many application variables (I prefer to use form references as
opposed to global variables, although, if I have time I may look at using the
new tempvars collection) and unfortunately this form can not be closed too
early because it may affect other form_unload and shutdown events.

However, from what you are saying you can not repurpose the Exit - Access
button so I may need to rework the shutdown/application exit process anyway.

Let me know what you come up with.

Regards
Guy

ps. Thank you for your previous assistance in managing/wrapping up multiple
Ribbons and Ribbon controls in collections and classes. I have it all
working, and applied a few other features so that Forms that share a Ribbon
properly maintain and set the Ribbon state when they become the
active/deactive form.
 
G

Guest

Hi Albert,

I was typing my response as you posted your solution.

Currently I disable alt-f4 and all other standard exit options (except Task
Manager End-Process) so that I can manage the application shutdown.

However, it's not code I've looked at in any detail for a few years, and I
agree it would be better it I wasn't constrained from using the standard exit
functionality, so I may review it, time and budget permitting.

Thanks for your assistance once again.

Guy
 
A

Albert D. Kallal

The reason I would like to repurpose the Access Exit button (the button at
the bottom of the Office menu) is that I need to control how the
application
shuts down so that all resources are released properly.

Sure, you make a great case.

I only making my case as to why I feel we don't nee to turn the close button
off.

However, that just *my* view.

I *still* think we should be able to turn it off. Regardless of even what
you need to
do (and you make a great case as to why you want to do this). The
bottom line is that you simply want to turn it off ,and that should be your
choice.
However, from what you are saying you can not repurpose the Exit - Access
button so I may need to rework the shutdown/application exit process
anyway.

Let me know what you come up with.

Well, actually, I never even thought of changing the on-action. if we can't
turn it off, perhaps we *can* set a on-action for the button...

darn....I just tried it..and, it don't seem to work....
 
G

Guest

I agree with your view, but as you say you should still have the option to
turn it off or repurpose it.

Cheers
Guy
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top