Solved

Problem Passing a Report Parameter In Access 2010 Database

Posted on 2016-08-11
3
36 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
  • 2
3 Comments
 
LVL 34

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 34

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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Introduction When developing Access applications, often we need to know whether an object exists.  This article presents a quick and reliable routine to determine if an object exists without that object being opened. If you wanted to inspect/ite…
Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

758 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now