Results 1 to 13 of 13
  1. #1
    Lounger
    Join Date
    Jan 2005
    Location
    Jacksonville, North Carolina, USA
    Posts
    29
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Get rid of Access background window (2003/SP1)

    Howdy again,

    Is there any way to get just a form to execute (without the default background access window)? I've already put the form I want in the autoexec macro and have taken out all of the toolbars; now I'm trying to figure out how to just get it so only my form comes up and not have the pesky second window in the background. I know it's cosmetic, but I worry the users might get confused.

    Any help is appreciated.

  2. #2
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Get rid of Access background window (2003/SP1)

    There really is no way to get rid of the "background" window because all your forms, reports, messageboxes, etc., are child windows of the main Access window.
    Charlotte

  3. #3
    Lounger
    Join Date
    Jan 2005
    Location
    Jacksonville, North Carolina, USA
    Posts
    29
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Get rid of Access background window (2003/SP1)

    Bummer ...

    [img]/forums/images/smilies/wink.gif[/img]

    Thanks anyway

  4. #4
    5 Star Lounger st3333ve's Avatar
    Join Date
    May 2003
    Location
    Los Angeles, California, USA
    Posts
    705
    Thanks
    0
    Thanked 2 Times in 2 Posts

    Re: Get rid of Access background window (2003/SP1)

    On the off chance Charlotte misunderstood your question: If the default window you're talking about is the Database Window rather than the background application window, you can hide the Database Window at startup by going to Tools-->Startup and unchecking the Display Database Window option.

  5. #5
    Lounger
    Join Date
    Jan 2005
    Location
    Jacksonville, North Carolina, USA
    Posts
    29
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Get rid of Access background window (2003/SP1)

    no ... unfortunately she's right. I'm trying to get my db to be in just one window. So, I guess another question is: Is there any way to lock the shape/size of the Access application window (and then I'd just maximize my db form)?

    [img]/forums/images/smilies/smile.gif[/img]

  6. #6
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Get rid of Access background window (2003/SP1)

    How are you at working with Windows API call? The only way to control a window size or position is from Windows itself, which means you would have to call into the Windows API in your startup code. I wouldn't recommend you try. What is your real concern with the main Access window? It may not look as clean as a VB modal form, but I don't see how it could confuse your users.
    Charlotte

  7. #7
    Lounger
    Join Date
    Jan 2005
    Location
    Jacksonville, North Carolina, USA
    Posts
    29
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Get rid of Access background window (2003/SP1)

    You're right ... I just don't like to admit to failure [img]/forums/images/smilies/wink.gif[/img]
    I'll leave it ...... for now >[img]/forums/images/smilies/biggrin.gif[/img]

    Thanks Charlotte

  8. #8
    3 Star Lounger
    Join Date
    Jun 2002
    Location
    Nottingham, Nottinghamshire, United Kingdom
    Posts
    257
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Get rid of Access background window (2003/SP1)

    I'd just like to add that you can get rid of all the toolbars and the comment bar at the bottom of the window. You can create your own menubar with, e.g. only one exit option. You can also change the title of the Access database window from Micro$oft Access to a name of your own choice in startup options.

    With maximised forms etc you can get very close to having an application that looks the way you want.

    David

  9. #9
    5 Star Lounger
    Join Date
    Jul 2004
    Location
    Ohio
    Posts
    629
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Get rid of Access background window (2003/SP1)

    If you just want your form to show, you can minimize and or hide the access window. Your form properties "Pop Up" should be set to Yes. Just copy this code into a module and call it using the examples in the function when loading your startup form. This gives you the effect of having a stand alone front end. notice: if you are previewing reports, you will have to maximize the access window as they are not able to "pop up". <img src=/S/aflame.gif border=0 alt=aflame width=16 height=16>

    Option Compare Database

    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

    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 'no Activeform
    If nCmdShow = SW_HIDE Then
    MsgBox "Cannot hide Access unless " _
    & "a form is on screen"
    Else
    loX = apiShowWindow(hWndAccessApp, nCmdShow)
    Err.Clear
    End If
    Else
    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
    End If
    fSetAccessWindow = (loX <> 0)
    End Function

    i got lost with the tabs, i hope that looks ok.
    <img src=/w3timages/blueline.gif width=33% height=2>
    <big>John</big>

  10. #10
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 28 Times in 28 Posts

    Re: Get rid of Access background window (2003/SP1)

    > if you are previewing reports, you will have to maximize the access window as they are not able to "pop up".

    Starting with Access 2002, reports DO have a Pop Up (and Modal) property.

  11. #11
    5 Star Lounger
    Join Date
    Jul 2004
    Location
    Ohio
    Posts
    629
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Get rid of Access background window (2003/SP1)

    oops, i should have looked at his version, good catch hans!
    <img src=/w3timages/blueline.gif width=33% height=2>
    <big>John</big>

  12. #12
    New Lounger
    Join Date
    Feb 2005
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Get rid of Access background window (2003/SP1)

    I use 'StartUp' to get rid of Access background window. Also to open the opening form, I don't use an autoexec macro.

    Under Tools, Startup,

    you uncheck "Display Database Window"

  13. #13
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 28 Times in 28 Posts

    Re: Get rid of Access background window (2003/SP1)

    Unchecking "Display Database Window" will hide the database window, but not the Access application window. Mulk wants to hide the latter.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •