I have a form with a Report button. When it is clicked a dropdown becomes visible and it displays multiple reports to choose from. When it is clicked another dropdown becomes visible and it displays multiple locations to choose from. When it is clicked I have this code:
DoCmd.OpenReport "Household Inventory", acViewPreview, , _
"[LocationName]=""" & [Forms]![frm_Main_Menu]![combo_Reports_Location] & """"
The reports opens with the correct Location. When the report is closed and the form "Activates", I call a Sub that makes sure all dropdown mades visible are changed to visible = false, but it shows the combo_Reports_Location has focus and I get the error that you cannot change the focus on a control that has focus.
How can I get around this because I want the form to open as it does the first time it opens with only buttons and no combo boxes? Thanks!
DoCmd.OpenReport "Household Inventory", acViewPreview, , _
"[LocationName]=""" & [Forms]![frm_Main_Menu]![combo_Reports_Location] & """"
The reports opens with the correct Location. When the report is closed and the form "Activates", I call a Sub that makes sure all dropdown mades visible are changed to visible = false, but it shows the combo_Reports_Location has focus and I get the error that you cannot change the focus on a control that has focus.
How can I get around this because I want the form to open as it does the first time it opens with only buttons and no combo boxes? Thanks!