Page 1 of 2 12 LastLast
Results 1 to 15 of 27
  1. #1
    pledbetter is offline Advanced Beginner
    Windows 11 Access 2019
    Join Date
    Jan 2010
    Location
    Martinsville, IN
    Posts
    93

    Combo Box will only work if Access is no minimized

    I have a very strange problem. I created a switchboard form that, among other things, has a combo box that allows the user to select from a static list. The appropriate form is opened depending on the selection made in the On Click Event. In my app I start with an Autoexec macro that calls up the switchboard. The On Load Event of the switchboard form minimizes Access. When a selection is clicked on the combo box, nothing happens. The selections are there and accessible. But nothing further happens. But when I pull up Access from its minimized state, and reload the switchboard form, it closes the switchboard form and pulls up the next form without issue.



    Form frmMainSwitchboard:
    On Load:
    Code:
    Private Sub Form_Load()
        ' Minimize Access so it's out of the way
        Application.DoCmd.RunCommand acCmdAppMinimize
    
    
    End Sub
    Data:
    No Control Source
    Row Source: "Pick Desired Report";"Month-To-Date";"Rolling Month-To-Date";"Last Week";"Top N"
    Row Source Type: Value List
    Bound Column: 1
    Limit To List: Yes
    Allow Value List Edits: No
    Inherit Value List: Yes
    Show Only Row Source: Yes
    Default Value: "Pick Desired Report"
    Enabled: Yes
    Locked: No
    Auto Expand: Yes
    Everything else is blank


    On Click Event:

    Code:
    Private Sub cboReportType_Click()
         
         
        If Me.cboReportType <> "Pick Desired Report" Then
        
    
    
            Select Case Me.cboReportType
        
                Case "Month-To-Date"
                    DoCmd.OpenForm "frmMTDSalesOrders", acNormal
                
                Case "Rolling Month-To-Date"
                    RollingMTD = True
                    DoCmd.OpenForm "frmMTDSalesOrders", acNormal
        
                Case "Last Week"
    
    
            
                Case "Top N"
            
            End Select
            
            'Close the main swithboard form
            DoCmd.Close acForm, "frmMainSwitchboard"
        End If
    
    
    End Sub


    Other:
    Pop-Up: Yes
    Modal: No
    Cycle: All Records
    Shortcut Menu: No
    Help Context ID: 0
    Has Module: Yes
    Use Default Paper Size: No
    Fast Laser Printing: Yes

    Everything else is blank

    Yes, my error trapping sucks. And I haven't entered code for the last two selections since the first two do not work. AGAIN, Everything works PERFECTLY if I run this within Access (Clicking Form View from Design View) but not from starting from just running the app which triggers the autoexec. I look forward to your responses!

  2. #2
    jojowhite's Avatar
    jojowhite is offline Competent Performer
    Windows 11 Access 2021
    Join Date
    Jan 2025
    Posts
    434
    what happens if you run the Form as Dialog:
    Code:
    DoCmd.OpenForm "formName",acNormal,,,,acDialog

  3. #3
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    6,556
    Going to have to upload a db that shows the issue I would have thought?
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  4. #4
    pledbetter is offline Advanced Beginner
    Windows 11 Access 2019
    Join Date
    Jan 2010
    Location
    Martinsville, IN
    Posts
    93
    I haven't tried. Again, it runs fine as long as the app is not started via the Autoexec macro.

  5. #5
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    6,556
    I have to ask?
    Why open Access and then immediately minimize it?
    That would annoy the hell out of me if I was opening it manually.

    FWIW I added your minimize line to my switchboard form. However I only have a combo like yours after clicking to another menu from the main switchboard. That combo works fine.
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  6. #6
    pledbetter is offline Advanced Beginner
    Windows 11 Access 2019
    Join Date
    Jan 2010
    Location
    Martinsville, IN
    Posts
    93
    Quote Originally Posted by Welshgasman View Post
    I have to ask?
    Why open Access and then immediately minimize it?
    That would annoy the hell out of me if I was opening it manually.

    Because I deploy it as an ACCDE and I don't want the users to see the laundry list of tables, queries, forms, and reports while interacting with my app. It's irrelevant to what the app does (Sales Reporting), and distracting. What the user is presented with is a clean form on their Desktop, without the Access clutter in the background. I have other apps like this. To date I have only used Command Buttons. This is the first time I have tried a Combo Box.

  7. #7
    pledbetter is offline Advanced Beginner
    Windows 11 Access 2019
    Join Date
    Jan 2010
    Location
    Martinsville, IN
    Posts
    93

    Database Snippet

    I'm sorry, I have tried and failed to upload a copy of my database as requested. I have uploaded other files before so I know how to do it. It's just ignoring me today.

  8. #8
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    6,556
    Quote Originally Posted by pledbetter View Post
    Because I deploy it as an ACCDE and I don't want the users to see the laundry list of tables, queries, forms, and reports while interacting with my app. It's irrelevant to what the app does (Sales Reporting), and distracting. What the user is presented with is a clean form on their Desktop, without the Access clutter in the background. I have other apps like this. To date I have only used Command Buttons. This is the first time I have tried a Combo Box.
    A. You could use an accdr?
    B. Just hide the navigation pane. https://www.devhut.net/ms-access-vba-hide-nav-pane/

    However a simple F11 gets it back in accde

    Edit: https://answers.microsoft.com/en-us/...0-6a162002633a
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  9. #9
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    6,556
    Quote Originally Posted by pledbetter View Post
    I'm sorry, I have tried and failed to upload a copy of my database as requested. I have uploaded other files before so I know how to do it. It's just ignoring me today.
    Go Advanced on the reply and Manage Attachments.
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  10. #10
    pledbetter is offline Advanced Beginner
    Windows 11 Access 2019
    Join Date
    Jan 2010
    Location
    Martinsville, IN
    Posts
    93

    DB in question

    Click image for larger version. 

Name:	IMG_3675.jpg 
Views:	22 
Size:	290.4 KB 
ID:	52760
    Click image for larger version. 

Name:	IMG_3676.jpg 
Views:	23 
Size:	300.6 KB 
ID:	52761


    The first picture is the file selected that I want to upload. The second is me attempting to upload it with this interface. Clicking "upload" yields nothing. What gives? It's not my computer because I just uploaded these jpgs.

    Crossposting.

  11. #11
    pledbetter is offline Advanced Beginner
    Windows 11 Access 2019
    Join Date
    Jan 2010
    Location
    Martinsville, IN
    Posts
    93
    Quote Originally Posted by Welshgasman View Post
    A. You could use an accdr?
    B. Just hide the navigation pane. https://www.devhut.net/ms-access-vba-hide-nav-pane/

    However a simple F11 gets it back in accde

    Edit: https://answers.microsoft.com/en-us/...0-6a162002633a

    I've never tried it that way, and I'm sure your way workd great. But can you tell my why my approach is not a best-practice approach? Using only Command buttons, everything works as expected. But as soon as I configure a Combo Box, BOOM, it blows up! Well actually, it just stares back at me.

  12. #12
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    6,556
    No idea TBH. I am not even saying it is bad practice, but to use whatever works.
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  13. #13
    Micron is offline Very Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,423
    From what I can make out of that second pic, you're at the stage that adds files to a holding/staging folder. Did you move the uploaded file to the attachments window? Did you get it from a directory folder (looks like you tried to get it from an Access previously opened file list)?
    There is a link at the top of the site page that says How to Attach Files. Maybe that will help.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  14. #14
    pledbetter is offline Advanced Beginner
    Windows 11 Access 2019
    Join Date
    Jan 2010
    Location
    Martinsville, IN
    Posts
    93
    Quote Originally Posted by Micron View Post
    From what I can make out of that second pic, you're at the stage that adds files to a holding/staging folder. Did you move the uploaded file to the attachments window? Did you get it from a directory folder (looks like you tried to get it from an Access previously opened file list)?
    There is a link at the top of the site page that says How to Attach Files. Maybe that will help.
    It never makes it to the list of uploaded files.

  15. #15
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    6,556
    Try another browser. That worked for me when chrome was not working. It is now.
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

Page 1 of 2 12 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Running Access in Minimized mode
    By Forbes in forum Reports
    Replies: 4
    Last Post: 09-14-2018, 12:39 PM
  2. can't print while running Access minimized
    By Dennis9412 in forum Reports
    Replies: 5
    Last Post: 01-22-2018, 07:44 AM
  3. Replies: 3
    Last Post: 01-16-2013, 02:53 PM
  4. Window Access Minimized/Maximized Problem
    By PATRICK in forum Programming
    Replies: 2
    Last Post: 09-18-2012, 06:25 AM
  5. Replies: 1
    Last Post: 08-17-2011, 01:43 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums