Hiding Access Window With DoCmd.runCommand AcCmdAppMinimize
Mar 28, 2007
Ok, I finally have it working the way I like. It's really slick - the main form (set to "PopUP" and with docmd.runcommand accmdappminimize line in the On_Open event) opens with customized icon (in titlebar and in windows taskbar) and behaves like a standalone program (you only see Access the first few seconds during opening before it's minimized).
The form can be minimized to windows taskbar and clicked to restore it (form's maximize button is disabled, for appearance sake). it can also be accessed via the alt-tab windows menu, where it also appears with a custom icon. so it's really slick, it behaves just like a standalone app. read on for the ", but..."
I also wrote 2 functions to handle reports.
1st (fnOpen, I also use it for forms, etc. via arguments, but only the reports have the following logic). This one closes my main form, maximizes Access (which has all menus/toolbars disabled, so it doesn't really look like Access, looks like a report viewer). This function is placed into all report buttons' On_Click event with report name as argument and object type (3 for report, because 0=table, 1=query, 2=form, 3=report in my fnOpen).
2nd. (fnCloseReport) is placed into all reports' On_Close event. This function opens my main form again on the tab from which report was called. It works, but herein lies the problem: after the form reopens, it no longer has the whole application's custom icon, but the Access "form" icon. And after this, if minimized to windows taskbar it actually minimizes as resized mini-window above the Start button (as has been described by others, just as it would within Access it it were visible) and Access appears minimized in the windows taskbar, so somehow the whole cool "standaloneness" is turned off.
I wonder if anyone has some suggestions for this. I spent some time researching and testing this and really like the functionality. When the form is displayed without Access, it cannot be right-clicked (at all), which is very useful (although I know there are other ways of protection).
BTW, all my other windows (all popup/modal) appear on top of the main form with no problems. I have "File Open" and "Save As" windows common dialogs that my app calls (via API) and I also have a custom form acting as dialog box (I use the acDialog intrinsic constant when I open it from code). so mutliple windows are not an issue as some have suggested.
Thanks in advance!
View Replies
ADVERTISEMENT
Jun 13, 2006
I have an Access 2000 application which, on startup, always launches a 'switchboard' form and sometimes gets information from the user during the startup. Both forms are opened with VBA using DoCmd.OpenForm; the switchboard opens as acNormal and the input form (when used) as acDialog.
Under normal circumstances this works fine.
If, however, the Access window ceases to be the active window in Windows (e.g. the user selects another application's window in the taskbar) the forms do not open (all other VBA code runs correctly).
Any ideas?
Simon
View 2 Replies
View Related
Apr 15, 2008
Back in 2004 a user (sbaxter) on this forum was offering to interrested members his utility for hiding Access window. Does anyone still have a copy of this utility handy that is willing to share? Thanks in advance. See reference post
http://forums.aspfree.com/microsoft-access-help-18/hiding-database-window-and-menu-bar-for-users-29928.html?&highlight=task
Never mind, I found the code I was looking for....
View 3 Replies
View Related
Mar 20, 2006
Hi,
Ok i am using the following code to hide the access window but when i do it, it also hides it from the taskbar aswell.
Is there any modifications to the code that will hide the background window but also keep it on the taskbar.
thanks
k0r54
Module: -
Option Compare Database
Private Declare Function IsWindowVisible Lib "user32" (ByVal hWnd As Long) As Long
Dim dwReturn As Long
Const SW_HIDE = 0
Const SW_SHOWNORMAL = 1
Const SW_SHOWMINIMIZED = 2
Const SW_SHOWMAXIMIZED = 3
Private Declare Function ShowWindow Lib "user32" (ByVal hWnd As Long, _
ByVal nCmdShow As Long) As Long
Public Function fAccessWindow(Optional Procedure As String, Optional SwitchStatus As Boolean, Optional StatusCheck As Boolean) As Boolean
If Procedure = "Hide" Then
dwReturn = ShowWindow(Application.hWndAccessApp, SW_HIDE)
End If
If Procedure = "Show" Then
dwReturn = ShowWindow(Application.hWndAccessApp, SW_SHOWMAXIMIZED)
End If
If Procedure = "Minimize" Then
dwReturn = ShowWindow(Application.hWndAccessApp, SW_SHOWMINIMIZED)
End If
If SwitchStatus = True Then
If IsWindowVisible(hWndAccessApp) = 1 Then
dwReturn = ShowWindow(Application.hWndAccessApp, SW_HIDE)
Else
dwReturn = ShowWindow(Application.hWndAccessApp, SW_SHOWMAXIMIZED)
End If
End If
If StatusCheck = True Then
If IsWindowVisible(hWndAccessApp) = 0 Then
fAccessWindow = False
End If
If IsWindowVisible(hWndAccessApp) = 1 Then
fAccessWindow = True
End If
End If
End Function
To call it: -
HideForm = fAccessWindow("Hide", False, False)
View 14 Replies
View Related
Nov 22, 2005
Hi,
I successfully made this work, but when opening a report to preview it (using a button click) . it doesn't show up, is there a workaround with this? Thanks in advance.
Kind Reagrds.
Nelson
View 11 Replies
View Related
Jan 1, 2008
Hi,
I have a couple of databases set up with shift key bypass and DB window hide and a couple of menu bar commands hidden (All code taken from this great forum :) ). Recently my company decided to upgrade Access 2000 to Access 2007 and they have given me a test environment and a time frame to convert / test all my applications.
I found this concept of ribbon and office links very different and shocking.
Is there a way of hidding somethings that you can do with the office links (like compact and repair) and a way of hiding some clusters in the ribbon (like export and import data, have a dtaasheet view of any form? etc) Any help or link along these lines would be helpful..
Thanks,
Priya
View 7 Replies
View Related
Apr 6, 2015
I am trying to Hide or Show the Access Window by using two buttons on a Form. Running Access 2013 in Windows 7 64bit.
I have used code from the Internet as below but added the PtrSafe item to the Function Declaration as below:-
Option Compare Database
'Hide Access desktop screen and float Forms on pc desktop
Private Declare PtrSafe Function IsWindowVisible Lib "user32" (ByVal hwnd As Long) As Long
Dim dwReturn As Long
Const SW_HIDE = 0
[Code] ....
I then have two buttons on a form coded as below:-
Option Compare Database
Private Sub cmd_Hide_dbw_Click()
Call fSetAccessWindow("Minimize", False, False)
DoCmd.OpenForm "frm_Test", acNormal
End Sub
[Code] .....
I have attached a Test Database which demonstrates the problem I am experiencing.
Do the following sequence...............
Open the Test Database. DO NOT ENABLE CONTENT
The Access 'Ribbon'Test_Database.accdb is active and usable
Open frm_Test in Design View in order to inspect, all should be as shown above.
Now click the Enable Content warning
Switch frm_Test to Form View
Click button Hide dbw. Closes the Access Window
Click button Show dbw. Opens the Access Window...HOWEVER....
Attachment 20252The Access Ribbon is locked and usable !!!
I cannot find a way to re-activate the Ribbon
View 2 Replies
View Related
Nov 14, 2014
Why does the DoCmd.TransferDatabase work in the Immediate window, but not in the Sub, which has always worked in the past?
Code:
Public tblname As String
Public tblNewname As Variant
Public pstrDatabasePath As String
Public Const dbType As String = "Microsoft Access"
[code]....
ERROR MESSAGE: 3125 '' is not a valid name. Make sure that it does not include invalid characters or punctuation and that it is not too long.
View 4 Replies
View Related
Jun 20, 2006
Think I've seen this posted on here recently but cant find it.
Is there a way to hide the database window so that only a form is visible?
Then if you need to view the database window you can press F11 to make it appear?
View 1 Replies
View Related
Aug 31, 2005
Hi,
I have a question;
If I hide the Database window and uncheck the Allow Full Menu checkbox from Tools--> Startup
The next time I open the application how can I get them back?
Any help will be very appreciated,
Thanks,
CS.
View 1 Replies
View Related
Jul 4, 2006
Dear friends,
Can someone tell me how to hide menu bar and table overview window in MS Access 2000? I tried to do it but was unable to implement it.Looking forward for your answers.
Thanks
View 2 Replies
View Related
Jun 1, 2004
Hy,I 've develop access database with several forms.I want to make my database window invisible behind forms.Also i want to make menu bar(shows file,edit,view....etc) invisible for one reason,all operation user need to do he can do on form.Thanks for help!
View 14 Replies
View Related
May 8, 2006
Hi,
Anyone know in microsoft access 97 is it possible to remove the close button (top right hand corner) when a form is maximised?
Thanks.
View 1 Replies
View Related
Apr 12, 2006
Below are my codes to display bitmaps in a MS Access form by just inserting the path to the image.
[Code].....
The output is attached in the jpeg file. However, as u can see from the jpeg, when i move from 1 record to another, the importing picture from "path name" keeps appearing when loading and disappears after the record is loaded.. How can i prevent tat window from appearing?
View 3 Replies
View Related
Aug 2, 2006
To save records in a form, close the form and open a switchboard, I have the following Event code on clicking a command button on the form:
'Command on last page to save records and go to Switchboard
Private Sub OpenSwitchboard_Click()
On Error GoTo Err_OpenSwitchboard_Click
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
DoCmd.Close acForm, "CaseNotes", acSaveYes
DoCmd.OpenForm "frmSwitchboard"
Exit_OpenSwitchboard_Click:
Exit Sub
Err_OpenSwitchboard_Click:
MsgBox Err.Description
Resume Exit_OpenSwitchboard_Click
End Sub
This seems to work okay in Access 2000, but I understand the DoMenuItem method is obsolete, and that I should replace "DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70" to a RunCommand method, but I am not sure about this.
I would be grateful for any help in replacing this piece of DoMethod code with RunCommand code! mcchu
View 4 Replies
View Related
Apr 13, 2006
I'm trying to hide access(i.e. toolbars etc.), and only view a form. Is this possible?
View 5 Replies
View Related
Aug 26, 2006
Here's another one on this subject... But can't seem to find the answer in the "Search" Currently I am using the "Call fSetAccessWindow(0)" method.... Well, all works fine until I start getting into reports. I have read in some post of other methods to hide Access. But I have yet to find any examples of the "easier way"..... Can anyone direct me to a post or link??
Thanks
Curtis
View 4 Replies
View Related
May 30, 2006
Hi guys, i read about this before but it did not work.
i am trying to hide the access environment but i couldnt.
i read in this forum that if i have a bmp with then same name than the db, the picture would replace the access environment. I have done this but the only thing that i achieved was to see the picter before access env. comes and then it desapears and the access env. shows up.
any suggestion?
thx max
View 4 Replies
View Related
Feb 8, 2006
Hello All!
As in the topic stands that im looking for a code that hides Access and it starts up like a normal program. Ive searched several things on the forums and i actually did found something only he didnt gave the code ;(.
So first question:
How can i do this with a code?
Second question:
What do i need to change on my forms?
Etc etc :)
Thanks alot in advance!
View 6 Replies
View Related
Aug 24, 2007
Hi.
I have a widely used application in Access 97.
Anyway, some staff are not using the forms' menu buttons but are playing around with the Access toolbar (file, edit, et cetera).
The administrator wants me to either disable that toolbar or hid eit from view. Any ideas?
Russ
View 1 Replies
View Related
Aug 8, 2014
I did a search and found this thread, and the only problem i encounter is the min max buttons are gone though it was set up as both enable, how to show those buttons.
[URL] ......
View 1 Replies
View Related
Jul 10, 2006
Hi,
I have been using "fSetAccessWindow (SW_HIDDEN)" in the open event of my
main switchboard to hide the grey Access screen from being visible behind
forms, reports, etc in this db. But when I started using a .vbs script file
to launch the db, the Access window stopped being hidden. (The reason I use
the script for launching is that it temporarily sets the db's security level
to 1 which stops the macro security warning from coming up.) Apparently MS
knows about this happening and released a technique to rectify the situation,
but I don't understand their instructions. It looks like they expect one to
have more understanding than I have. Could someone help me get this
impliemented? Here is the article:
http://support.microsoft.com/kb/167659/en-us
Thanks!
View 2 Replies
View Related
Apr 2, 2013
Code : DoCmd.ShowToolbar "Ribbon", acToolbarNo
Should hide the ribbon. Instead I get a 'Variable Not Found' error.
This should be simple.
View 13 Replies
View Related
Feb 15, 2005
Hi,
I have a parent window which upon clicking on a button will pop-up a child window containing a listbox. The listbox recordsource is a subset of the parent window. I want the user to select a record from the listbox which will load the selected record onto the parent window.
How does one pass argument back from child window to parent window?
From parent window to child window, I used
docmd.openform ,,,,,,[argument] and me.openargs in the child window
thanks in advance.
View 4 Replies
View Related
Mar 26, 2014
I am using Microsoft Access 2010.
I have a form, having following fields
Nationality, Combo box, Options are Indian/foreign State: With list of States in India.
What I want is, when data entry operator , select, Foreign, State field automatically hides.
And when data entry operator , select Indian, State field shows in the form.
How this can be done in Access 2010
View 5 Replies
View Related
Mar 29, 2007
I already have this working by means of:
doCmd.RunCommand acCmdAppMinimize in Form_Load (or Form_Open) events.
This works great to hide Access and only display the main form (like a standalone app).
But I have 2 issues:
1. The PopUp form (main or "switchboard" if you like) opens, then Access is minimized, but then the form looses focus. If there are other programs running, form will be behind them!
2. Access is first seen opening (for a moment) and THEN minimized (see 1.). Is there a way NOT TO SEE IT at all? :)
Thanks!
View 3 Replies
View Related