Combo selection

texasalynn

Well-known Member
Joined
May 19, 2002
Messages
8,458
I'm trying to create a form that will let the user select which query to run from the combo box? How do I do that? Whenever I select the combo box it wants me to pick only one. Do I have to do something else; maybe to put all the query names in a table? As you can tell this is new to me and I'm at a loss how to go about this.

Thanks . . . texasalynn
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
The easiest way is just to write all of your queries into a table, make that table the recordsource for the combo box, and then tell it to open that query in the After_Update event of the combo box. I'm not sure about your experience with VBA, but the procedure would be:

Your_combo_after_update()
docmd.open query Your_combo, acnormal, acedit
End Sub

*You can actually have the database write its queries to a table automatically, but that takes quite a bit more code to accomplish. Search around for examples if you're interested.
 
Upvote 0

Forum statistics

Threads
1,223,532
Messages
6,172,879
Members
452,486
Latest member
standw01

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top