423,688 Members | 1,894 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 423,688 IT Pros & Developers. It's quick & easy.

Report including manually entered parameters

P: 41
Dear Community

In my database I have several seminaries with several dates and participants.

I would like to make a report for the user of the database in the front end. The report shall consist a "manually defined" (meaning in the front end opens up a popup window in which the user can choose each existing seminary out of a list) seminary with all the participants. That brings me to two problems:

1. How can I make such a popup window before my report opens up?
2. How can I then make, that the chosen seminary out of the list is taken as the basis for my report? It somehow has to be sent to the query that creates the report information or even filter a report with all seminaries and all participants.

Can anybody help me doing that?

Thanks a lot!!

Mike
Aug 2 '17 #1

✓ answered by ADezii

  1. In your Main Form, create a Command Button that will Open an Input Form.
  2. In this Input Form, create a Combo Box that will display all Seminaries alphabetically along with a hidden, Primary Key Field.
  3. Create a Report showing all the Participants, for all Dates, for all Seminaries. The Record Source for this Report will be qryParticipants. Look at it, specifically the Relationships among the three Tables involved.
  4. Create a Command Button on this Input Form. In the Click() Event of this button, Open the previously created Report using the OpenReport() Method but have the WHERE Argument point to the Seminary selected in the Combo Box.
  5. The Report will Open displaying all Participants for all Dates for the Seminary selected on the Input Form.
  6. I do realize that this is a lot to absorb, so I Attached a simple Demo for you in order to get you started.
  7. Good Luck with your Project - any questions, please feel free to ask.

Share this Question
Share on Google+
5 Replies


ADezii
Expert 5K+
P: 8,585
  1. In your Main Form, create a Command Button that will Open an Input Form.
  2. In this Input Form, create a Combo Box that will display all Seminaries alphabetically along with a hidden, Primary Key Field.
  3. Create a Report showing all the Participants, for all Dates, for all Seminaries. The Record Source for this Report will be qryParticipants. Look at it, specifically the Relationships among the three Tables involved.
  4. Create a Command Button on this Input Form. In the Click() Event of this button, Open the previously created Report using the OpenReport() Method but have the WHERE Argument point to the Seminary selected in the Combo Box.
  5. The Report will Open displaying all Participants for all Dates for the Seminary selected on the Input Form.
  6. I do realize that this is a lot to absorb, so I Attached a simple Demo for you in order to get you started.
  7. Good Luck with your Project - any questions, please feel free to ask.
Attached Files
File Type: zip Seminaries.zip (36.7 KB, 17 views)
Aug 2 '17 #2

P: 41
Dear ADezii

Thanks a lot for your answer, especially for the demo! I could almost manage it. Unfortunately, when I click on my Run-Button (cmdOpenReport), a Popup-Field shows up where I am asked to put in manually the Seminar_ID. If I negate it and just click OK, the report shows up but is empty.

I allowed myself to send you my situation in a pdf. Do you maybe find the mistake?

Thanks a lot!

Mike
Attached Files
File Type: pdf objects in database and VBA.pdf (48.8 KB, 62 views)
Aug 3 '17 #3

ADezii
Expert 5K+
P: 8,585
Sounds like you have not set the Record Source for the Report which is why [Seminar_ID] is not being recognized. The Record Source of the Report must include [Seminar_ID] and it must return ALL Records. See what you can do, and if you are still having problems, can you Upload your DB stripped of any sensitive/confidential information?
Aug 3 '17 #4

P: 41
Dear ADezii

Wow, you are really great! I put the Seminar_ID into the source of my record and it works.

This is amazing!! Thank you so much!!!!

Mike
Aug 4 '17 #5

ADezii
Expert 5K+
P: 8,585
You are quite welcome, Mike.
Aug 4 '17 #6

Post your reply

Sign in to post your reply or Sign up for a free account.