Hide Back Access Window on Load (1 Viewer)

chineloogbonna

Registered User.
Local time
Today, 14:50
Joined
Jul 30, 2018
Messages
65
Hello,
I know there are tons of "how to" pages on the internet on how to hide the back window. However, all the ones I've tried hide the toolbar and the database window but they do not hide the back window that has the access path up top, not sure what that is called?

'Hide database window
DoCmd.SelectObject acTable, , True
DoCmd.RunCommand acCmdWindowHide
DoCmd.ShowToolbar "Ribbon", acToolbarNo

Does anyone know how to hide that? I also have my form set with
Popup = yes
Modal = no

Thank you in advance!
 

theDBguy

I’m here to help
Staff member
Local time
Today, 13:50
Joined
Oct 29, 2018
Messages
13,735
Hi. Yes, there are plenty of samples showing how to do what you want using APIs. However, it's not for the faint of heart, since there's a lot of preparations required to make it work.
 

chineloogbonna

Registered User.
Local time
Today, 14:50
Joined
Jul 30, 2018
Messages
65
Well, I'd be willing to give it a shot. Its just bothersome when I do a lot of preparations then it doesn't work. Once I have the correct code I'll be able to save it for future databases as well.

Thanks
 

theDBguy

I’m here to help
Staff member
Local time
Today, 13:50
Joined
Oct 29, 2018
Messages
13,735
Well, I'd be willing to give it a shot. Its just bothersome when I do a lot of preparations then it doesn't work. Once I have the correct code I'll be able to save it for future databases as well.

Thanks
No problem. Check out this demo from Colin (isladogs). Hope it helps...
 

isladogs

CID VIP
Local time
Today, 21:50
Joined
Jan 14, 2017
Messages
14,255
Hi
Its called the application window and its easy enough to hide as my demo hopefully shows. You can also find it here at AWF https://www.access-programmers.co.uk/forums/showthread.php?t=293584

Things to bear in mind include
1. Your forms need to be popups otherwise they will be hidden as well
2. As you'll have no ribbon or navigation pane, all functionality must be done on your forms
3. When reports are opened you will need to either restore the print preview ribbon or use report view with a print button on the report
 
Last edited:

theDBguy

I’m here to help
Staff member
Local time
Today, 13:50
Joined
Oct 29, 2018
Messages
13,735
Hi
Its called the supplication window and its easy enough to hide as my demo hopefully shows. You can also find it here at AWF https://www.access-programmers.co.uk/forums/showthread.php?t=293584

Things to bear in mind include
1. Your forms need to be popups otherwise they will be hidden as well
2. As you'll have no ribbon or navigation pane, all functionality must be done on your forms
3. When reports are opened you will need to either restore the print preview ribbon or use report view with a print button on the report
Hi Colin. Just a quick question, since I don't do this. When you said to "restore the ribbon," does it mean restoring the application window as well? That would be my guess, but just wanted to make sure. Thanks.
 

chineloogbonna

Registered User.
Local time
Today, 14:50
Joined
Jul 30, 2018
Messages
65
Ok, I have a question. I can't figure out where the modDatabaseWindow is being ran from? I see an AutoKey macro but that seems to be for something else?

Thanks
 

theDBguy

I’m here to help
Staff member
Local time
Today, 13:50
Joined
Oct 29, 2018
Messages
13,735
Ok, I have a question. I can't figure out where the modDatabaseWindow is being ran from? I see an AutoKey macro but that seems to be for something else?

Thanks
Hi. Just a guess, but did you check the Click event of the button?
 

isladogs

CID VIP
Local time
Today, 21:50
Joined
Jan 14, 2017
Messages
14,255
Hi Colin. Just a quick question, since I don't do this. When you said to "restore the ribbon," does it mean restoring the application window as well? That would be my guess, but just wanted to make sure. Thanks.

There are at least 3 ways of managing reports with this type of app.
All require a 'skeleton' application window in place whilst the report is open
1. Open report in print preview and restore the ribbon (File/Print Preview only) temporarily. Remove it again when the report is closed
NOTE: The File menu can be partly/completely emptied if security is an issue
2. Open report in dialog mode - use right click menu to print
3. Open report in report view (optionally with Print button)

See screenshots for each method together with an empty File menu
 

Attachments

  • Report1-PrintPreview.jpg
    Report1-PrintPreview.jpg
    88.9 KB · Views: 24
  • Report2-Dialog.PNG
    Report2-Dialog.PNG
    74.4 KB · Views: 23
  • Report3-ReportViewWithPrintButton.PNG
    Report3-ReportViewWithPrintButton.PNG
    99.1 KB · Views: 18
  • EmptyFileMenu.PNG
    EmptyFileMenu.PNG
    8.4 KB · Views: 22

theDBguy

I’m here to help
Staff member
Local time
Today, 13:50
Joined
Oct 29, 2018
Messages
13,735
There are at least 3 ways of managing reports with this type of app.
All require a 'skeleton' application window in place whilst the report is open
1. Open report in print preview and restore the ribbon (File/Print Preview only) temporarily. Remove it again when the report is closed
NOTE: The File menu can be partly/completely emptied if security is an issue
2. Open report in dialog mode - use right click menu to print
3. Open report in report view (optionally with Print button)

See screenshots for each method together with an empty File menu
Okay. Thanks for the additional information. Cheers!
 

isladogs

CID VIP
Local time
Today, 21:50
Joined
Jan 14, 2017
Messages
14,255
You're welcome. Going to update the example app ... again!
 

isladogs

CID VIP
Local time
Today, 21:50
Joined
Jan 14, 2017
Messages
14,255
Ok, I have a question. I can't figure out where the modDatabaseWindow is being ran from? I see an AutoKey macro but that seems to be for something else?

Thanks

You don't run modules.
However code used to hide the application window (etc) is run from the Form_Load event of the startup form frmStart.

There is no autoexec macro though that could be used to run the relevant code if preferred.
The autokeys macro is used to set keyboard shortcuts for selected actions. I often use them when in development mode. Not vital to the functionality of this app.

EDIT
Posts crossed.
You can either click the Show Navigation Pane button or the Open the VBE button to view the module code.
As I said originally, with this type of app, you need to ensure all functionality required by your users is available from your forms
 

theDBguy

I’m here to help
Staff member
Local time
Today, 13:50
Joined
Oct 29, 2018
Messages
13,735
I am not sure how to open the module for modDatabaseWindow?
Hi. I'm not sure what you mean? Also, why are you trying to open it? Although I don't have a copy of the demo, I doubt it would be locked down that it can't be opened.
 

chineloogbonna

Registered User.
Local time
Today, 14:50
Joined
Jul 30, 2018
Messages
65
Im not sure what Im doing wrong. The code in the even procedure is

On Error GoTo Err_Handler

If Me.cmdAppWindow.Caption = "Show Application Window" Then
'can't do this if form maximized & fills screen
DoCmd.Restore
Me.cmdRestore.Caption = "Maximize Form"

' SetAccessWindow (SW_SHOWMAXIMIZED)
SetAccessWindow (SW_SHOW) 'v3.43
HideRibbon 'v3.43
blnShowWindow = True
Me.cmdAppWindow.Caption = "Hide Application Window"

DoEvents
Else
'close & reopen form
Application.Echo False
DoCmd.Close acForm, Me.Name
DoCmd.OpenForm "frmStart"
' SetAccessWindow (SW_SHOWMINIMIZED)
Application.Echo True

blnShowWindow = False
End If


Exit_Handler:
Exit Sub

Err_Handler:
strProc = Application.VBE.ActiveCodePane.CodeModule.ProcOfLine(Application.VBE.ActiveCodePane.TopLine, 0)
MsgBox "Error " & Err.Number & " in " & strProc & " procedure : " & Err.description
Resume Exit_Handler
 

theDBguy

I’m here to help
Staff member
Local time
Today, 13:50
Joined
Oct 29, 2018
Messages
13,735
Hi. Which event procedure would that be? Are you getting an error message? If so, what does it say and which line is causing it?
 

chineloogbonna

Registered User.
Local time
Today, 14:50
Joined
Jul 30, 2018
Messages
65
Yes, its in the Application Window button.

Its showing errors for the captions which I am trying to remove but this code is kind of confusing. I can't seem to get it right. Any help would be greatly appreciated!
 

theDBguy

I’m here to help
Staff member
Local time
Today, 13:50
Joined
Oct 29, 2018
Messages
13,735
Yes, its in the Application Window button.

Its showing errors for the captions which I am trying to remove but this code is kind of confusing. I can't seem to get it right. Any help would be greatly appreciated!
Hi. Is the error happening with the demo or your db? If your db, can you post a sample copy, so we can see how you tried to apply the demo code to it?
 

chineloogbonna

Registered User.
Local time
Today, 14:50
Joined
Jul 30, 2018
Messages
65
The code is on my db under the form load event procedure. However, I don't have the label captions that are mentioned in the code. Which part is for the hide or show window?

Do you mean upload my db?
 

Users who are viewing this thread

Top Bottom