Disable Title Bar Minimise, Restore and Close Buttons (1 Viewer)

stu_c

Registered User.
Local time
Today, 21:15
Joined
Sep 20, 2007
Messages
489
Hi all,
anyone got any ideas how to disable the Minimise, Restore and Close Buttons at the very top right hand corner of the Access application?

I have got buttons on my database to open / close everything so no need for them, even to hide the full Title bar probably be okay.

I am running Access 2007.
 

apr pillai

AWF VIP
Local time
Tomorrow, 02:45
Joined
Jan 20, 2005
Messages
735
Set the following Property Values of the Form as shown below:

  1. Pop Up = Yes
  2. Control Box = No
  3. Border Style = None
 
Last edited:

stu_c

Registered User.
Local time
Today, 21:15
Joined
Sep 20, 2007
Messages
489
hi mate just tried this but didnt do anything, I have the close button removed off the form but its the one for the Access Application
 

highandwild

Registered User.
Local time
Today, 21:15
Joined
Oct 30, 2009
Messages
435
Hi Stu_c

I had this problem a while ago but now I call a sub upon loading the
first form which contains the following code.

DoCmd.SelectObject acTable, “tbl_Config”, True
DoCmd.RunCommand acCmdWindowHide

DoCmd.ShowToolbar "Ribbon", acToolbarNo

The table name “tbl_Config” needs to be a table that will always exist in the database and this table exists in all of my databases.

I hope that this works for you.
 

boblarson

Smeghead
Local time
Today, 14:15
Joined
Jan 12, 2001
Messages
32,059
It is apparent that people are not understanding that you are not talking about the buttons on Forms or Reports but are talking about the ones on the Access Application Window itself.

I am on my cell phone so I can't get the link for for you at the moment, but there is a Windows API you can use. Only thing is, I don't believe that it works in later versions of Access.
 

highandwild

Registered User.
Local time
Today, 21:15
Joined
Oct 30, 2009
Messages
435
Bob Larson pointed me in the right direction a while ago and the code detailed in my previous post was the outcome of that advice.

I assume that stu_c wants to hide everything except the Forms and Reports that he has developed himself which is what I intended.
 

stu_c

Registered User.
Local time
Today, 21:15
Joined
Sep 20, 2007
Messages
489
Hi all
I have had the code below for a while to hide the ribbon but doesnt remove the top application bar, is it possible to modify this for it to work?

P.s. i am using 2007

Private Sub Form_Open(Cancel As Integer)
Call HideUnHideToolbar(True)
End Sub

Public Sub HideUnHideToolbar(blnHide As Boolean)
If blnHide = True Then
DoCmd.ShowToolbar "Ribbon", acToolbarNo
Else
DoCmd.ShowToolbar "Ribbon", acToolbarYes
End If
End Sub

Private Sub MenuTitle_DblClick(Cancel As Integer)
Call HideUnHideToolbar(False)
End Sub
 

boblarson

Smeghead
Local time
Today, 14:15
Joined
Jan 12, 2001
Messages
32,059
Hi all
I have had the code below for a while to hide the ribbon but doesnt remove the top application bar, is it possible to modify this for it to work?

P.s. i am using 2007

Sorry, I've been too busy to be on the board the past few days.

I create a custom Ribbon with this as the XML:

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

And then set it as the application's main Ribbon.

That gets rid of both the Ribbon AND the QAT bar.
 

khodr

Experts still Learn
Local time
Tomorrow, 00:15
Joined
Dec 3, 2012
Messages
112
the thread is little old,
but i was searching and i found the solution on microsoft website,
I don't know if you solved the issue but I will just paste the link here incase other users are looking for this solution, I did it on my database and it works fine. the link is:
http://support.microsoft.com/kb/245746
I hope its helpful.
 

stu_c

Registered User.
Local time
Today, 21:15
Joined
Sep 20, 2007
Messages
489
Hi all just followed the link but doesnt work :(

words on the website "Please note that this technique affects the Close button on the application window of Microsoft Access, not the Close button on the Database window"

I have a code to hide the Ribbon on form load it seems to be when the ribbon is visable the CLOSE button is deactivated but when it is hidden its not :(
 

khodr

Experts still Learn
Local time
Tomorrow, 00:15
Joined
Dec 3, 2012
Messages
112
Hello Stu_C
find attached a sample database I made ready for you,
the Content are:
Module1, Class Module, AutoExec Macro,
just Import these into your database and the X button of Microsoft Access will be disabled, you can still close access by going to File Menu Exit,
I assume here you hide the Access Ribbon using code and also this procedure can still be ignored if the user Pressed Shift Key while opening the database,
if you want Code to hide the Ribbon and disable the shift key I can upload it here,
you are most welcome in advanced,
regards I hope I was a help.
 

Attachments

  • Disable_Access_Close_Botton.zip
    20.9 KB · Views: 872

stu_c

Registered User.
Local time
Today, 21:15
Joined
Sep 20, 2007
Messages
489
Hello Stu_C
find attached a sample database I made ready for you,
the Content are:
Module1, Class Module, AutoExec Macro,
just Import these into your database and the X button of Microsoft Access will be disabled, you can still close access by going to File Menu Exit,
I assume here you hide the Access Ribbon using code and also this procedure can still be ignored if the user Pressed Shift Key while opening the database,
if you want Code to hide the Ribbon and disable the shift key I can upload it here,
you are most welcome in advanced,
regards I hope I was a help.

hi mate
thanks for the link, I am still having the same trouble,
when the Ribbon is hidden the Close button is still active but as soon as I make the ribbon visable it disables the close button, not sure way :(
 

khodr

Experts still Learn
Local time
Tomorrow, 00:15
Joined
Dec 3, 2012
Messages
112
How are hiding you ribbon stuc
Because I am using these modules in my database and it works fine but I have my startup form to hide the ribbon and my loaded main form settings is popup = yes
Try this
Else did you try the database before importing it into your database and checked if it works fine because for me it works like a charm
 

Kimbrainscan

New member
Local time
Tomorrow, 00:15
Joined
Jul 29, 2020
Messages
5
Hello Stu_C
find attached a sample database I made ready for you,
the Content are:
Module1, Class Module, AutoExec Macro,
just Import these into your database and the X button of Microsoft Access will be disabled, you can still close access by going to File Menu Exit,
I assume here you hide the Access Ribbon using code and also this procedure can still be ignored if the user Pressed Shift Key while opening the database,
if you want Code to hide the Ribbon and disable the shift key I can upload it here,
you are most welcome in advanced,
regards I hope I was a help.
Thanks work fine. Can you please send me a code how to disable the restore button too.
 

Users who are viewing this thread

Top Bottom