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 !!!
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
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
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
Through a set of circumstances, I have had to quickly migrate a long-standing (and business critical) database from Access 2003 to Access 2013, without the sort of prepping and planning that I would normally do in such circumstances.
Most functionality appears to be working ok...
Many of my database objects, especially queries, were given meaningful descriptions.
For example, a number of queries might have been described as "Accounts Data Validation".
When I wanted to run validation of the Accounts data, I would simply sort the database queries window by description, then scroll to the relevant section and run all of the tagged queries in turn.
However, having migrated to Access 2013, although the descriptions are still shown, I can no longer sort by them !
Medium term, I could probably assign different database objects to "Groups", but we are talking hundreds, perhaps even thousands of different objects and that would be a laborious and extremely tedious process.
Any way of sorting the database window by description in Access 2013 ?
I've recently moved up to Access 2013 (from Access 2010) and everything went well, until one day my splash screen was blank and the program had empty fields...after seeing that all the links to the BE were OK, I re-booted and everything worked fine....until the next day the same thing happened...... The program randomly falls over about once or twice a week and I have to re-boot to cure it.....
My splash screen has a standard dlookup ( [=DLookUp("Banner","tblCompanyInfo")] ) to display the active company name...and sometimes its populated and other times its not..... if its not populated then loads of other fields on the forms are also blank - even if they point to valid data in the database!!!!!!
Win7 (both 32 and 64bit) with Access 2013 32bit on three PC's - same problem on all!!!!
I've recently moved up to Access 2013 (from Access 2010) and everything went well, until one day my splash screen was blank and the program had empty fields...after seeing that all the links to the BE were OK, I re-booted and everything worked fine....until the next day the same thing happened...... The program randomly falls over about once or twice a week and I have to re-boot to cure it.....
My splash screen has a standard dlookup ( [=DLookUp("Banner","tblCompanyInfo")] ) to display the active company name...and sometimes its populated and other times its not..... if its not populated then loads of other fields on the forms are also blank - even if they point to valid data in the database!
I run Win7 (both 32 and 64bit) with Access 2013 32bit on three PC's - same problem on all!
I have a people table; Ethnicity Table; Program Type Table; Attendance Table.
I enter the people into the people table then enter people into the attendance table with lookup for name from the people table and a lookup for program type from program type table and enter date attended. I then run a query on the attendance table to remove duplicates. I created a form from the attendance query there are 3 headers Program, Ethnicity, Name. but the program type comes up as the ID number and not the text name.
The Ethnicity did the same thing but when I added the Ethnicity from the people table to the ethnicity header it show up as the name and I hide the box with the number but when I add the program type from the program type table to the program header is changes the source of the report to the program type table and then nothing shows up. It did not do that when I added the ethnicity type from the ethnicity table to the ethnicity header.
I have problem sharing an Access 2013 file from one cumputer and then change the data in the file on another computer, or i can change it but the change wont be made one both computers.
I'm working so i need my secretary to be able to change information or add, but i also need to get the change.
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!
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!
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? :)
Firstly, thanks to everyone for help so far. My first access project in a proffessional environment has been successful and mostly down to the people who have helped me here. I know i didnt really do it all myself but i have learned things that will hopefully serve me well going forward!
Secondly, i apologise for the ambiguously titled thread, i'll explain what i mean.
Basically i have my form that looks like the below
What i'm trying to do, is make the questions below ("Risk in Authority" and "If Not, Risk Referred?") hidden, unless the answer to "Are All Policies Acceptable?" is No.
I have managed to make it happen, but it's far from perfect. As below:
I'd set the value for Visible to No in the properties for every object in the Questions (the pretty boxes are all named things like Box123 and Label 53, all set to hidden). Then i set the "On Click" event of the No in "Are All Policies Acceptable" (called Option168) to
This works ok, but if you click on the same option twice it reverses the action.
Is there a more effective way of doing this? maybe through Validation?
Thanks for any help once again. (I've also recommended this board to a couple of guys in the office who are already proficient with Access and SQL who can hopefully contribute to the community )
Edit: As an Addendum - this formattign should only apply to one record at a time. So if the question are visible on record 1, they could still be hidden on record 2. If that's even possible.
I have created a database that is hosted on our company sharepoint. The database contains subcontracts with resource information by geographic location and status. I have built queries and added them as reports to the web app but I need to figure out a way to sum totals on the queries. For example, one report lists all resources of a particular type by 4 different zones and 3 different status. I need to have the bottom row show the total resources.
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
Using MS Access 2013, part of Office 365, I am trying to construct a report that has a different first page footer than the rest of the document. Googling for answers has produced a few options, but none that seem to work. I have virtually no VBA knowledge. I was hoping that there might be some code that I could place in a label in the footer and have it work.
I have an Access 2013 database file with many fields. One of them, I'll call it Field 3, is a box which I would like to either leave blank or put a check mark in it. I would like to be able to create an Iif field for Field 3 where a check mark is automatically inserted in Field 3 IF Field 1 - Field 2 <or= 0, otherwise I'd like Field 3 to remain empty.
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.