Solved

Problem Passing a Report Parameter In Access 2010 Database

Posted on 2016-08-11
3
72 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 37

Accepted Solution

by:
PatHartman earned 500 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 37

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

Turn Insights into Action

Communication across every corner of your business is essential to increase the velocity of your application delivery and support pipeline. Automate, standardize, and contextualize your communication processes with xMatters.

Question has a verified solution.

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

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…
The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

690 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