| Member with 96 posts. THREAD STARTER | | | |
Access 2010 and Combo boxes again Hi Guys, me again...
Still working on my database and combo boxes.
At the moment I have a combo box [SelectReportList] that lists all the available reports to run.
I also have 2 combo boxes [SelectSupplier1] and [SelectSupplier2]that allow the user to select a supplier based on what report is selected in the first combo box. These 2 combo boxes are visible or not depending upon which of the 2 reports in box one are selected. To make the form tidy I have layered the two combo boxes on top of each other. As far as the end user is concerned, if they select a report where they have to choose a supplier, they see the combo box to select the supplier. I know its a bit 'clunky', but for only 2 reports it works.
However, I was hoping that I could replace these 2 combo boxes [SelectSupplier1] and [SelectSupplier2]with just one [SelectSupplier3]that displays the suppliers and runs the relevant report.
i.e.
If the user selects Supplier Report 1, the suppliers are displayed in the new combo box. When the user selects the supplier, Supplier Report 1 is generated.
If the user selects Supplier Report 2, the suppliers are displayed, but when the supplier is selected Supplier Report 2 is generated.
I've been experimenting with Select Case and the RunSQL commands in the code builder but can't find a way to get it to work. I need the code to tell 'it' that whatever is selected in [SelectSupplier3] runs the SQL in the RowSource property for the two reports in question.
Any ideas?
All assistance gratefully accepted.
Karen |