Solved Combo Box will only work if Access is not minimized

Local time
Today, 11:44
Joined
Feb 24, 2025
Messages
10
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!
 
Can you show us what you have in your Autoexec macro?
 
I have never used combobox Click event, I use AfterUpdate. However, likely that won't make a difference.

Have you step debugged? Is event triggered? Is combobox Value getting selected item?

Could provide db for analysis - follow instructions at bottom of my post.
 
Have you looked at Collin's work on hiding the application interface? Also, is the form that you are trying to launch also a popup form? If it's not, then it will only be visible when the main application window is also visible.
 
Last edited:
Can you show us what you have in your Autoexec macro?
1742506158679.png
 
I have never used combobox Click event, I use AfterUpdate. However, likely that won't make a difference.

Have you step debugged? Is event triggered? Is combobox Value getting selected item?

Could provide db for analysis - follow instructions at bottom of my post.
There's not much to step debug. I just want it to open a form. And it does it perfectly as long as Access is not minimized. But I don't want the Access clutter in the background as part of my user experience. And if I were to put a Command button there instead, it works fine. I just don't want to be stuck with Command buttons as my only choice.
 
Switchboard form is opened ReadOnly - combobox (or listbox) won't work because this is "data entry" even if not BOUND. Same as not able to type into textbox, form is locked.

I tested with my form.
 
Last edited:
Very interesting. I see what you mean now. This is not an actual switchboard, it's just a form you are using to launch other forms. The click event is not firing when the application window is minimized in the manor you are doing it.

All I did was delete the autoexec and use the standard open form in the options menu and it worked fine. Not sure why it doesn't work the other way though.

File > Options > Current Database > Application Options > Display Form: frmMainSwitchboard

UPDATE: I see now that the AutoExec was literally calling that main form up with AllowEdits turned off. My Bad.
 

Attachments

Last edited:

Users who are viewing this thread

Back
Top Bottom