Window Access Minimized/Maximized Problem

I am calling this function on a button "fSetAccessWindow (SW_SHOWMINIMIZED)" to minimize my application so I can use my desktop area and have the icon to return to my application, but when I click in the Icon to return the Access Window is not hidden anymore, it shows the access window and my form. How can it be hide again as soon it gets maximized?


Post your answer or comment

comments powered by Disqus
Hello, i will reassume at the best of my possibilities what's my problem.
I have my access 2007 application with some forms and reports, ok.

What i want to do:

- I always want to see the windows taskbar
- I don't want the form/reports to be resizable
- I don't want the form/reports to be minimized/maximized, but i want to be able to mimimize/maximize the entire access application. (I mean, if i minimize a form/report i always see the access window behind, i want to minimize all)

What i'm able to do:

- I can see the taskbar only if i set the form/report border as "Sizable" (i hope it's like this in English, i have the Italian version), but with this i can resize the form/report and i don't want it to be possible.
- I can minimize/maximize the form/report itself but behind i always see the access window.
- I can minimize/maximize the access window with DoCmd.RunCommand acCmdAppMinimize/Maximize with forms, but it is not possible with reports.

I know it's a bit complicate, but if someone has a possible entire/partial solution i would be happy to read it, at least for having some hints.

Thanks

Ok, this seems really lame to have to post this but in Access2007 none of my form or table windows have Mininize, Maximize, or the ability to resize. There is a Close X but nothing else. Being used to Access2003, I am used to being able to resize the windows or at least minimize them. The properties panel has control for these items but they do not appear when I set the properties to yes.

I have a data base that has been developed over the years on Access 95. It has about 2000 queries and 3000 macros. The only code it has is on the OnClick on labels and the code in each case opens Word docs that have queries linked to the docs and it inserts Access field data into Bookmarks, prints the Word docs, copies the doc and pastes it back to Access memo field and closes Word docs without saving. The code also runs several macros.

There are several of us using this data base on different computers and we recently updated the computers and they have XP Home.

The problem with the Access 95 on Win XP is that many things, even including openin the data base window, takes forever the first time it is done UNLESS Ctrl Alt Del is used to bring up the Task Manager. When that is dome then a form might open in about 10 seconds as opposed to what seems forever. However, once a form or other task has been done once then it peforms at normal speed fpor any subsequent use. Even clicking on the Tables or Forms tab when the data base is first opened takes forever unless the Task Manager is brought up.

I have tried using the compatability function on Win XP and have selected both Win 95 and Win 98. This solves the speed problem but many of the macro actions etc do not run.

Sooooo, if I can't fix the Access/Win XP problem then I may have to get Access XP. I am worried about conversion problems and also any loss of functions. For example when Access 97 came out there were conversion problems for converting Access 97 and we also noticed that Access 97 was lacking some macro functions that were in Access 95. We were getting messages coming up that Access 97 did not have this fucntion, so we bailed out

Any help, ideas (both good and bad ) would be enormously appreciated.

Mike

I know the Access 2007 ACCDE and ACCDB's no longer can use workgroup administrator for security and boy, has it been a nightmare without the WG administrator capabilities. I've put code in to hide objects, set database options to hide objects, make ribbons unaccessible, make an accde, and still, when the access app has problems like user lockup (in a beta version we tested), all of a sudden, the code to hide objects and hide the navigation section becomes derelict and all users can see everything in the navigation section. Totally frustrating. There's no security whatsoever except the modules not being opened as a user (accde).

I miss the workgroup administrator...never had any app broken into using it. Yes, I can use it with MDe/MDb files if I make the access 2007 files with those extensions. But there seems to be little security for the extensions of accce or accdb. I'm just afraid that the mde/mdb files will be obsolete soon so am wanting to work it out with the latest extensions.

Anyone have a solution?

I want to disable the minimize/maximize/restore buttons for reports opened in preview mode. Here is the code I wrote:

Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long

Private Const SC_MAXIMIZE = &HF030
Private Const SC_MINIMIZE = &HF020
Private Const SC_MOVE = &HF010
Private Const SC_RESTORE = &HF120
Private Const SC_SIZE = &HF000
Private Const SC_CLOSE = &HF060
Private Const MF_BYCOMMAND = &H0

Private Declare Function GetSystemMenu Lib "user32" (ByVal hwnd As Long, ByVal bRevert As Long) As Long
Public Declare Function RemoveMenu Lib "user32.dll" (ByVal hMenu As Long, ByVal uPosition As Long, _
ByVal uFlags As Long) As Long


Public Sub DisableResizing(Rpt As Report)
Dim hMenu As Long
hMenu = GetSystemMenu(Rpt.hwnd, 0)

Call RemoveMenu(hMenu, SC_MAXIMIZE, MF_BYCOMMAND)
Call RemoveMenu(hMenu, SC_SIZE, MF_BYCOMMAND)
Call RemoveMenu(hMenu, SC_MOVE, MF_BYCOMMAND)
Call RemoveMenu(hMenu, SC_MINIMIZE, MF_BYCOMMAND)
Call RemoveMenu(hMenu, SC_RESTORE, MF_BYCOMMAND)
Call RemoveMenu(hMenu, SC_CLOSE, MF_BYCOMMAND)

End Sub

The only option that is actually working on the report windows is SC_MOVE (window can t be move anymore), but none of the others. I take it as a proof that Rpt.hwnd actually grabs the desired window. I cannot find error in the code, and I cheked the constants against reference documents.

Anybody has an idea about where the problem lies in?

I have a db that has a splash screen form appearring followed by the switchboard. In the Timer event of the Splash screen, I have the folowing VBA code, which hides the menubarstoolbars:


	Code:
	    Dim i As Integer
    
    For i = 1 To CommandBars.Count
        CommandBars(i).Enabled = False
    Next i

    For i = 1 To Application.CommandBars.Count
        Application.CommandBars.Item(i).Enabled = False
    Next

    DoCmd.Close acForm, "frmSplash", acSaveNo
    DoCmd.Maximize

    DoCmd.OpenForm "frmSwitchboard"

In Tools|Startup, I have unticked 'Display Database Window' and unticked 'Use Access Special Keys'.

When the db opens, everything works as my client wants it to i.e. no one should see or have access to the db window that includes disabling the F11 key which I have also done.

However whilst at the development stage, I have placed a transparent label on the corner of the switchboard known only to myself, so that when I double click it, the db window, menubarstoolbars should appear and the db window should be maximized. Here's the VBA code behind the label: -


	Code:
	    Dim i As Integer
    
    For i = 1 To CommandBars.Count
        CommandBars(i).Enabled = True
    Next i

     DoCmd.SelectObject acTable, , True
     DoCmd.SelectObject acForm, Me.Name
     DoCmd.Maximize

However the problem lies with the fact that popup switchboard also maximises. How do I prevent this?

The Border Style of the Switchboard is set to Dialog.

I've been using Access 2000 at work for 9 months (Windows 98SE). Recently, whenever I click on Help, the help window appears minimized at the top of the screen. I always have to maximize it myself. I never had to do this before. This behavior does not happen in Word or Excel. Both regular help and VBA help are affected. How do I return Access to normal behavior?

I searched through the forum and came accross this thread where he created the following module.

http://www.access-programmers.co.uk/...ferrerid=11730

Option Compare Database
Option Explicit

Global Const SW_HIDE = 0
Global Const SW_SHOWNORMAL = 1
Global Const SW_SHOWMINIMIZED = 2
Global Const SW_SHOWMAXIMIZED = 3

Private Declare Function apiShowWindow Lib "user32" _
Alias "ShowWindow" (ByVal hwnd As Long, _
ByVal nCmdShow As Long) As Long

' This function is to be called as such:
' Call fSetAccessWindow (argument)
' The arguments are as follows;
' SW_HIDE - this hides the access database window
' SW_SHOWMAXIMIZED - this maximizes the window
' SW_SHOWMINIMIZED - this minimizes the window
' SW_SHOWNORMAL - this just shows (as normal) the window


Function fSetAccessWindow(nCmdShow As Long)
'Usage Examples
'Maximize window:
' ?fSetAccessWindow(SW_SHOWMAXIMIZED)
'Minimize window:
' ?fSetAccessWindow(SW_SHOWMINIMIZED)
'Hide window:
' ?fSetAccessWindow(SW_HIDE)
'Normal window:
' ?fSetAccessWindow(SW_SHOWNORMAL)
'
Dim loX As Long
Dim loForm As Form
On Error Resume Next
Set loForm = Screen.ActiveForm

If Err <> 0 Then
loX = apiShowWindow(hWndAccessApp, nCmdShow)
Err.Clear
End If

If nCmdShow = SW_SHOWMINIMIZED And loForm.Modal = True Then
MsgBox "Cannot minimize Access with " _
& (loForm.Caption + " ") _
& "form on screen"
ElseIf nCmdShow = SW_HIDE And loForm.PopUp <> True Then
MsgBox "Cannot hide Access with " _
& (loForm.Caption + " ") _
& "form on screen"
Else
loX = apiShowWindow(hWndAccessApp, nCmdShow)
End If
fSetAccessWindow = (loX <> 0)
End Function

The problem I am having is I am getting Syntax errors at three of the lines.

I want the access window to be minimized with my popup forms displayed WITHOUT the use of a shortcut.

Does anyone know how to get this to work? Or does anyone know a better method?

THanks

Is there a way to keep the user from Maximizing or Restoring the Access window? I have my database minimizing on open and showing all the forms as popups. I have it set to only restore the Access window when a report is selected for obvious reasons. How do I force the user to not be able to maximize or restore the Access windows from it's minimized position. Will I still be able to restore it for reports? Thanks for your help!

Vassago

I keep Access minimized until a report is open. When a report is open, I run the following code:

DoCmd.RunCommand acCmdAppMaximize
DoCmd.Close acForm, "frm_onlinereports"
DoCmd.OpenReport "report1", acViewPreview

All works fine. Access maximizes to allow my report to be shown with my custom toolbar. The problem lies in minimizing access when the report is closed. I run the following code:

DoCmd.ShowToolbar "ReportView", acToolbarNo
DoCmd.RunCommand acCmdAppMinimize
DoCmd.OpenForm "frm_onlinereports"

I get an error at acCmdAppMinimize. The error says."The command is not available now. Why not? Am I doing something wrong? I've tried what I can think of. Any ideas?

Thanks!

Vassago

Upon closing a database using Access 2000 Runtime, I am getting the following error: -

Microsoft Access for Windows has encountered a problem and needs to close.

This happens just as I am closing the database down and not at any other time. It also only happens on Access Runtime.

Can anybody please help?

The option "Show Windows in Taskbar" was working very fine in Access 2003. However, when I immigrate to Access 2007, the problem arise and checking this option checkbox doesnt take effect in Access 2007.

for example, if I generate more than one report at the same time, they are not appearing in the taskbar. I need to make both of them appear to do something. please advise.

I am having this problem with accees 2007 , when i create a form

that should open as a "Dialogue Window " , it opens maximized and like a

tab .

when i open an acess 2003 database , with the same form it opens like a

"Dialogue window " , but when i copy the same form into my access 2007

Database it opens maximized and like a tab !


how can i fix this problem ?!


help is appreciated .

Does anyone know how to hide the MS Access 2000 application window control box when using toolbars on a form? I have already disabled them on the forms within my application, however, the control box for Minimize, Maximize, Restore and Close still appear in the upper right hand corner of the screen. No errors occur when exiting forms and subforms throughout my application using the Close button on the toolbars. However, when clicking the X in the control box MS Access attempts to quit and close resulting in errors. I have tried to use the logic provided in the Microsoft Knowledge Base article Q210299 ("Maximized form shows control box and Minimize, Maximize, and Restore buttons") but I receive the compile error - "Expected variable or procedure, not module" when executing the code in the Onload property of the forms. Any ideas?

Hi All,
I have a database that tracks documents received for translation. The request is logged via a form and assigned a Category and Subcategory (which correspond to folders on our server where the translator will save the completed document). When the document is complete, the translator adds the Document Name to the record (via a linked form). I have a button on the main form to View the completed document. So far all this works great. My problem is that after I've viewed the document, which is in Word or Publisher or whatever, and close the document's application, my Access form is minimized on the taskbar and I'm looking at my Desktop. I want the user to be able to close Word, for example, and have the form be maximized again. Not sure how to accomplish that. Here is my code that opens the document:


	Code:
	Private Sub cmdViewDoc_Click()
On Error GoTo HandleErrors

    'open the translation document
    Dim strFileName As String
    Dim strExt As String
    Dim strDirectory As String
    Dim intFile As Long
    Dim myDir
    
    Call cmdCompletion_Click 'opens the linked form containing the document
                            'name
    Me.SetFocus
        
    strDirectory = "elant01datasharedTranslations" & _
        Forms!frmTranslationRequest!cboCategory.Column(1) & "" & _
        Forms!frmTranslationRequest!cboSubCategory.Column(1)
    strFileName = Forms!frmCompletionInfo!DocumentName
    myDir = strDirectory & "" & Dir(strDirectory & "*.*")
    
    Do While myDir  ""
        intFile = InStr(1, myDir, strFileName, vbTextCompare)
            If intFile  0 Then
                strExt = Right(myDir, Len(myDir) - _
                    InStrRev(myDir, "."))
                Exit Do
            End If
            
        myDir = Dir
    Loop
    
    Me.cmdViewDoc.HyperlinkAddress = strDirectory & "" & strFileName & _
        "." & strExt
        
    DoCmd.Close acForm, "frmCompletionInfo"
        
Exit_cmdViewDoc_Click:
    Exit Sub
    
HandleErrors:
    If Err = 94 Then
        Err = 0
        MsgBox "This translation is not yet completed.", vbOKOnly
        Resume Next
    Else
        MsgBox Str(Err)
        MsgBox Err.Description
        Resume Exit_cmdViewDoc_Click
    End If
            
End Sub

Any ideas?

Thanks in advance!
Carmen

Hi...

I've just upgraded to windows 64 Bit OS. I have some DBs set up with ODBC connections to a MySQL server.

Problem being I crash access every time I try and Link/Import to a ODBC DB.

I had Problems setting up the ODBC's first of all as thier isnt a 64 bit ODBC driver yet... had to use the set up in C:WINDOWSSysWOW64 folder to set it up initally....

Any Ideas anyone....?

Cheers

Mike

I have an Access 2007 application installed on a network with 12 users. Each user has their own copy of the front end (FE) database .accdb file. The backend (BE) database .accdb file is on a drive mapped to a shared folder on the server.

The FE database contains links to tables in the BE database. Forms in the FE are bound to tables in the BE. Users typically open the FE application main form, which is not bound to a table, at the start of the day and leave it open all day. The application window is minimized when not in use.

Users were experiencing delays when first using the application after it was minimized for a while. I suspected that the table links to the server were timing out while the application was minimized and the connection to the server had to be reestablished. So, I bound the main form to a linked table to keep the server connection up. This worked - no more delays.

Now, users are getting "Can not save; locked by another user" error boxes popping up randomly throughout the day - even when the FE application is minimized and not actively using the BE data tables.

I have error handling in all the FE forms and no form error handler is being hit when these error boxes pop up. So, my theory is that the error message is not referring to a data table in the BE but rather to the BE .laccdb file which is periodically being updated by the 12 users keeping the BE database connections open. And, occasionally 2 users try to update the .laccdb file at the same time.

Am I correct that the locking error message refers to the BE .laccdb file? If yes, how can I stop the locking error messages from popping up on the users screens?

Or, is there a better way to solve my first problem of delays after the application has been idle for a while?

We have developed an Access application for a customer. When opening report previews or printing reports to printers, the font is often changed to an extremly large size or landscape changes to portrait. Changing the landscape/portrait setting in the Page Setup Dialog Box sometimes solves the problem, but when opening the same report later, the problem occurs again.
The application runs on a Windows network. The problem occurs with various network printers and local printers. It occurs with Access full version and runtime version. A correct page preview may result in a bad print-out.
The system is Windows XP Professional SP1 with Office XP SP3.
On our network, we have the same system, but the problem never occurs.

Has anybody encountered the same problem? Suggestions how to solve the problem? Thanx!

I am currently doing a night school course on Access 97 and I have come across a problem that the tutor cannot resolve.

I have constructed the tables, queries and forms and all are giving the required results in preview.

The problem I have is that when I try to create a report using the wizard based on a query I get an error message 'No current record'. When you click on ok you are returned to the database window.

Has anyone any ideas why it is doing this and how is the problem might be resolved?

Many thanks in advance.

We have an , CMS.mdb, that is published on a Citrix server. The MS Access database has a Startup routine that hides the Database window and opens the MS Access form called frmSwitch.

If I have the CMS.mdb on my C: drive and double click it, it opens to frmSwitch and the Database window is hidden. The button on the task bar on my laptop is titled CMS  [frmSwitch : Form]. If I navigate to another form in the database the button on the task bar has the name of that other form. If I minimize the MS Access window and then maximize it by clicking the button on my task bar, it comes back to the form I was on when I minimized. This is the behavior we would expect.

If instead I use the .ica file to open the application on the Citrix server, I double click the .ica icon on my desktop, and after I log in to Citrix it opens to frmSwitch and the Database window is hidden. This is the behavior we would expect. The button on the task bar on my laptop is titled CMS : Database - Remote.

Issue: If I minimize this .ica window and maximize it by clicking on the button on my task bar, it comes back to the CMS.mdb file but with the database window displayed. This is not the expected behavior.

This is a major issue for us, because once the database window is available (unhidden) to the user, they can change data, forms, reports, queries, etc.

I'm wondering if there is something about the way Citrix or the ICA file is set up that is causing this behavior?

Hello all... please help, before my head explodes for good.

I have a 2003 mdb that uses a front end on each of our 6 networked computers (OS - XP). The backends are located on my T: drive. Each year has a seperate backend, which the user selects from the main menu in the front end. This system has worked without any issue for 4 years.

My co-worker's computer crashed last week, and it was determined that she would need a new CPU.

Herein lie the problem - the new computer came with Windows 7 (i've been trying to dodge this bullet since it was introduced) - it was also installed with MS Office 2007.

When you open a form in the new computer, it will not allow edits - it opens as though it is read only if anyone else is using the database concurrently. However, if no one is on the database, the new computer will allow you to edit records on the form - the catch is it won't allow anyone else to even access the backend. I thought it was simply an issue with the new frontend opening exclusive, but couldn't change the settings.

Busy time of year - lots of issues, so I decided to have ONLY access 2003 re-installed and Access 2007 uninstalled.

Problem is the same - cannot edit any records. even reinstalled the front-end from scratch - it works for all other users, but not from the new CPU. I don't know where to begin.

Any thoughts / suggestions would be GREATLY appreciated.
Cheers
Dave

Hi all,

I'm experiencing an issue since converting to Windows 7 in that with a switchboard form, when I click on the button to open specified form from the switchboard, Microsoft Access is minimized in the task bar (but it does open). I need to see about having the forms open up on top of the switchboard so that it is ready for use to input data. This works in Windows XP fine, it appears to be isolated to Windows 7.

Any ideas?

Thanks!

Hi,

I have a problem with multiple users accessing the same MS Access 2000 database at the same time. The database is stored a directory under windows XP Professional which is set as a ‘shared folder’ enabling other users to edit the files. The database is stored on the server machine within a networked workgroup of 4 computers. The database file is not split up, and I have set the database file properties in access to be in ‘shared’ mode and not in exclusive mode. I have not set/changed any of the security user/group permissions under Access.

The problem is that if the database is open on one computer, and someone else tries to access the database at the same time, the database won’t open at all. An error message appears stating:
“The DB has been placed in a state by user ‘Admin’ on machine ‘Louise’ that prevents it from being opened or locked.”
When I try to read up on the help page, it doesn’t give me any additional information other than it’s an error #3734. I have followed all the instructions carefully in Microsoft Access and Windows XP on how to share a folder/DB file, but I still get this error message. The only way the DB file can be opened over the network, is if it is not already opened. However, I have Word document files in the shared directory which can be opened by multiple users at the same time.

I am designing and installing this database for a friend at his workplace. The strange thing is that the multi user access works perfectly when I install the database on the lab computers at university. The lab computers are also using Windows XP Pro, the only difference being that the file is shared using permissions via the Properties > Security tab. Due to the way the lab computers are set up, I can only share the folder via the security permissions, and not via the ‘shared folder’ way as done at the friend’s workplace.

I am really puzzled here as to why multiple users cannot open the same DB file on the workplace’s computer? Does this seem more of an Access problem or a Windows XP network-sharing problem? Any help will be most appreciated.

Thanks,

Raymond

hi all, please help with this:

on a form i have a Hyperlink to a MSWord template.

so the msword window opens but when the user close the msword window, access is minimized.

i want my access Form/Window to stay Restored behind MSWord window.

how ?

thanks,
Piet.


Not finding an answer? Try a Google search.