Generate Report based on Drop-down Selection

majid.pervaiz

Registered User.
Local time
Today, 05:11
Joined
Oct 15, 2012
Messages
110
Dear Experts,

Can someone please guide me how to generate the report based on the selection from the drop-down. For illustration purpose, I have added the sample database:

So I have data that lists down the process names for multiple countries, and I want to generate a report based on the input / selection of the country.

For example, for UK if I have 10 processes, France 20 etc. I will select UK from the drop-down and it will generate the report for UK only.

appreciate your guidance.
 

Attachments

Step 1. Throw away your query and base your report just on the table.

Step 2: On the Onclick Event of your form's button add this code:

DoCmd.OpenReport "ReportTest", acViewPreview, , "[Country]='" & Me.Combo1 & "'"
 
Step 1. Throw away your query and base your report just on the table.

Step 2: On the Onclick Event of your form's button add this code:

DoCmd.OpenReport "ReportTest", acViewPreview, , "[Country]='" & Me.Combo1 & "'"
thank you so much it worked, I really appreciate your support
 
there is one more condition I need to set, due for review is another column which is showing "True" or "False"

In this command where I can this condition
DoCmd.OpenReport "ReportTest", acViewPreview, , "[Country]='" & Me.Combo1 & "'"
 
I looked at the database you posted. There is no DueForReview field showing "True" or "False." If there was such a boolean field, and you wanted to select rows where that value is "True," then amend the code to...
Code:
DoCmd.OpenReport "ReportTest", acViewPreview, , "[Country]='" & Me.Combo1 & "' AND DueForReview"
 
You could also do something more like this, in which the selection is done in the UI before running the report. This gives the user more immediate visibility on what is and what isn't due...
 

Attachments

Users who are viewing this thread

Back
Top Bottom