Open a report depending on selection in combo box

JQasd

Registered User.
Local time
Today, 22:11
Joined
Jun 21, 2016
Messages
35
Hi there ,

I have a List button that is to open reports whenever a certain metal is selected from the drop down list.

Can you guide me how do this by VB coding. Currently, I have used macro which opens the report for Aluminium when it is selected .as the number of metals have increased using if else in the Macro doesn't seem practical.

Thanks
 
It sounds as if you should be filtering your report based on the selection, are you opening a specific report for the metal at the moment ?
 
It sounds as if you should be filtering your report based on the selection, are you opening a specific report for the metal at the moment ?


Yes, there is a separate report for each metal.
 
Are the reports the same but with your criteria set to the specific metal in the reports underlying query?
In fact can you post up the SQL of the reports records source?
 
Are the reports the same but with your criteria set to the specific metal in the reports underlying query?

There are 10 different reports extracted from their specific queries generated by the main table. For instance, when Aluminium is selected Al-Report is opened. When Steel is selected Steel-Report is opened. They aren't connected to each other
 
If the reports are completely different the only way you can achieve your aim is probably to add a field to your Metals table, called ReportTitle, this assumes you have a metals table.
Then in your list box or combo control add the report as a hidden column and use it to open the specific report.
It does sound as if your data may not be stored very well, if you have to have a different report for each metal, this will be come very unmanageable over time.
 

Users who are viewing this thread

Back
Top Bottom