dbaspot
Tags Register FAQ Calendar Search Today's Posts Mark Forums Read

Access 2007 RunTime Ribbon - ms-access

This is a discussion on Access 2007 RunTime Ribbon - ms-access ; Is there a way to disable the office button and the close button (upper-right) from the Access 2007 run-time ribbon? Vincent...


Home > Database Forum > Other Databases > ms-access > Access 2007 RunTime Ribbon

Reply

 

LinkBack Thread Tools Display Modes
  #1  
Old 10-02-2007, 03:54 PM
Database Bot
 
Join Date: Sep 2009
Posts: 1,236,254
Database Administrator is on a distinguished road
Default Access 2007 RunTime Ribbon

Is there a way to disable the office button and the close button
(upper-right) from the Access 2007 run-time ribbon?

Vincent

Reply With Quote
  #2  
Old 10-02-2007, 10:24 PM
Database Bot
 
Join Date: Sep 2009
Posts: 1,236,254
Database Administrator is on a distinguished road
Default Re: Access 2007 RunTime Ribbon

In runtime, most of the commands will not even show. However, you can put
items like this in the ribbon:

Reply With Quote
  #3  
Old 10-03-2007, 05:31 PM
Database Bot
 
Join Date: Sep 2009
Posts: 1,236,254
Database Administrator is on a distinguished road
Default Re: Access 2007 RunTime Ribbon

On Oct 2, 10:24 pm, "ARC" wrote:
> In runtime, most of the commands will not even show. However, you can put
> items like this in the ribbon:
>
>
Reply With Quote
  #4  
Old 10-03-2007, 08:37 PM
Database Bot
 
Join Date: Sep 2009
Posts: 1,236,254
Database Administrator is on a distinguished road
Default Re: Access 2007 RunTime Ribbon

I noticed as well that the previous code to disable the top-right 'x' button
no longer works in Access 2007.

So, I wonder if there is an "application_on_close" type event where we can
run a proc?

For me, I would want to code it to close all open forms, and run a backup
routine.

Let me know if you find something. I would prefer if there was an
application on close, instead of disabling the x button (which doesn't look
all that great, IMO).

Andy

Reply With Quote
  #5  
Old 01-06-2009, 11:34 AM
Database Newbie
 
Join Date: Jan 2009
Posts: 1
timritter is on a distinguished road
Default Re: Access 2007 RunTime Ribbon

The only way I've found to do this in 2007 is to have a hidden form that opens when the database starts up, and has the following code (example) on its unload event, and on whatever form or menu you want to allow them to close from also sets a tempvar called 'CloseButtonClicked' to true to allow the app to exit. There is a text box on the hidden form called 'CanDbClose' also.

Private Sub Form_Unload(Cancel As Integer)
On Error Resume Next
If TempVars("CloseButtonClicked").Value Then Forms!nameofhiddenform!CanDbClose = False

If Forms!nameofhiddenform!CanDbClose = True Then
Cancel = True
MsgBox "You cannot close application using this button. You may exit from the main menu only.", , "Application Title"
Else
MsgBox "Application shutting down.", ,"Application Title"
Application.CloseCurrentDatabase
End If

End Sub
Reply With Quote
  #6  
Old 12-14-2009, 12:00 PM
Database Newbie
 
Join Date: Dec 2009
Posts: 1
jshuffleton is on a distinguished road
Default Re: Access 2007 RunTime Ribbon

Sorry to ask a stupid question, but I have loaded the unload event, works great thanks, but having problems getting my one page I want to exit from properly. Not sure exactly how to do this part ...

and on whatever form or menu you want to allow them to close from also sets a tempvar called 'CloseButtonClicked' to true to allow the app to exit. There is a text box on the hidden form called 'CanDbClose' also.

Any chance you have an example you could show? Or help someone who just appers to not know how to properly set the tempvar?
Thanks!
Jeff
Reply With Quote
Reply

Thread Tools
Display Modes



All times are GMT -4. The time now is 05:14 AM.