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
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
I am using Access 2010 and trying to hide the background access window, so that only my forms are visible to the end users.
After researching, I found these VBA codes, but I always get an error. I have changed all my forms & reports to Pop-up and Modal. This is the code that I use on OnLoad of the Main (first form):
When I open my the database- the mian window is still there and I get an error
"The espression On Load you entered as the even property setting produced the following error: Only comments may appear after End Sub, End Function or End Property.
*The expression may not result in the name of a macro, the name of a user-defined function, or [Even Procedure]. *There may have been an error evaluating the function, event or macro.
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.
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.
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
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 !!!
Form_A (main form for the application - should always be open) Form_B (always open, but sometimes has visibility set to false) Form_C (opens from button on Form_B)
When I press the button on Form_B, the only code behind it is DoCmd.OpenForm "Form_C". This seems to hide Form_B, and open Form_C behind Form_A (which is the main form of the application) inside of an Access window.
I would like Form_C to open in front of Form_B. I suspect that I set up the form incorrectly or something when I created it, and it is therefore opening inside an Access window.
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
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!
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?
I have made a form on access which will be used by other employees within the company, however they have never used access before and they are wanting to access only just the form as I feel with Access and all the tools in the background will confuse them, plus I don't want them editing the data base its self.
Is there a way to only bring up the form, unless I obviously need to edit the date base.
I've done some research on Google and it seems I need to use:
SW_SHOWMINNOACTIVE
However I can not seem to find how I would use this or where?
and also if i did find a way to only bring up the form, how would I be able to switch it from that veiw to the veiw I edit in?
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
I would like to change the color of the actual access database background. I've done my forum searching and found many many threads explaining how to do this but i cant open any of the sample DB's. Access says the file is readonly and you need to be able to edit upon the first opening or something to that affect. I assume its becuse the sample is a newer or older access than im running(XP)
Sorry to rehash old threads but i cant get the info from them. Can anyone help..Grey sucks ha
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.
I was wondering if this was possible. I did a search on Google and on this form and I could not find anything. Is it possible to display a form without displaying Microsoft access in the background? In other words I would like to display just the form alone with access running or if possible a way to have access minimized with the form still showing. If anyone knows any tricks on this could be performed I would be very grateful.
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 ;(.
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?
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.
I'm using the changebackgroundcolor.zip sample that I found here at Lebans site. URL....I'm trying to find a way to keep the color that I picked after the database closes. I tried to follow the example here URL....but couldn't get it to work.how to get the color to stay on the color that was picked from the dialog box?
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!