?
Solved

Problem Passing a Report Parameter In Access 2010 Database

Posted on 2016-08-11
3
Medium Priority
?
76 Views
Last Modified: 2016-08-11
I have an Access 2010 database that I am using as a test to Store Historical Maintenance records  for different pieces of machinery. I am looking at producing a report for each machine. I was looking at passing a parameter to the report for a particular machine which would then display all the records for that particular machine.

The database comprises  5 tables:

4 of the tables are for storing details of the service job to save the operator having to type them in each time -
i.e.

tblElement - populated by frmNewElement form

tblMachine - populated by frmNewMachine  form

tblTasks - populated by frmNewTasks  form

tblManufacturer

The 5th Table -  tblHistory - populated by the frmMaintenance  form is the one that stores the records that I am trying to report from. I have set up qryHistory query which allows me to pass a date parameter to the MaintenanceHistoryByDate Report which works OK.

However, I have tried several ways to create a query that would allow me too pass a Machine name parameter to another report I have created -   Maintenance Schedule  but it either returns nothing or the debug screen launches.

I have attached the test database with 5 dummy records to view
TPMScheme11.accdb
0
Comment
Question by:rabpwh1000
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 38

Accepted Solution

by:
PatHartman earned 2000 total points
ID: 41752406
I added a new form to run the reports.  Using prompts in the queries is annoying for reports since you will be prompted multiple times.  The OpenReport method allows a where argument to be passed and that is what i did.  I also added validation which you may or may not want but if you don't want to require the arguments, you will need to change the procedure to eliminate the where argument if no argument is provided.
TPMScheme11Fixed.accdb
0
 

Author Closing Comment

by:rabpwh1000
ID: 41752445
Thanks Pat I have been trying to get this done for days now
0
 
LVL 38

Expert Comment

by:PatHartman
ID: 41752450
You're welcome.  Hope you can understand how to expand the process as you add new reports and variables.
0

Featured Post

Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Suggested Courses

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question