Question

Query for the report footer

Asked by: nabil_lb

Hi all,
I am designing a report using MS Access. I need to fetch data to display it in the report footer. The data that needs to be displayed in the report footer comes from a qurey (F) other than the qurey (D) that fills the details section.
I am sure the the query (F) returns only one row, it is desinged to do that. I need to fill these values in text controls in the report. The query takes parameters.

I tried to put in the text field , data source property QueryF!Field1, but when I run the reports it asks me to enter a parameter named [QueyF]. I tried to used Domain Aggregate function DFirst, but still I got the same.

Thanks in advance

This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Asked On
2005-09-28 at 04:32:38ID21576769
Tags

dfirst

,

access

,

query

,

report

Topic

Microsoft Access Database

Participating Experts
3
Points
400
Comments
13

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

  1. REPORT FOOTER
    WHERE CAN I ADD A REPORT FOOTER ? I ONLY FOUND REPORT SUMMARY BUT i THINK IT IS NOT A REPORT FOOTER BECUASE IT PRINT BEFORE A PAGE FOOTER
  2. Add a footer to DBGrid
    Dear Experts, please help ! How can we make ( simple ) footer to a dbgrid in order to sum the qty ? Thanks from apin
  3. ERROR in Sum(Field1) in footer of continous form
    Hi. I have a simple continuous form that contains several fields from a query as well as a few textboxes that do some calculations. On my computer these fields Sum fine in the footer. However, when I roll the program to the clients computer, when I try to do a summary in...
  4. Count something in the footer
    I have a report with a field named txtAnswer in the detaikl section of the report. In the footer section then I want to count the number of times a capital "X" displayed in that field. How can I do this? --Steve
  5. How do I print an aggregate list of values in a group footer
    I have a column in the detail section of the report that flags the rows that meet certain criteria (example: "start date < currentdate"). In the group footer, I need to print the key value of the rows that got flagged or that met the criteria (example: 3557 Olso...

Free Tech Articles

  1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
    It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
  2. SCCM OSD Basic troubleshooting
    SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
  3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
    This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
  4. Create a Win7 Gadget
    This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
  5. Outlook continually prompting for username and password
    There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
  6. Backup Exchange 2010 Information Store using Windows Backup
    There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

Cloud Class Webinars

  1. Avoiding Bugs in Microsoft Access
    Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
  2. Top 10 Best New Features in Visio 2010
    Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
  3. IT Consultant Business Secrets Revealed
    Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
  4. Disaster Recovery and Business Continuity
    Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
  5. Organize Your Visio Diagrams with Containers and Lists
    Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
  6. How to Us Objects, Properties, Events and Methods in Microsoft Access
    Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

Join the Community

Give a Little. Get a Lot.

Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.

Join the Community

Answers

 

by: peter57rPosted on 2005-09-28 at 04:37:38ID: 14973891

Hi nabil_lb,
> The query takes parameters.
So how do you expect the parameters to be entered?

You will need to use Domain Aggregate function but we need to be clear about the parameters first.

Pete

 

by: dannywarehamPosted on 2005-09-28 at 04:38:04ID: 14973893

You could use a D function:

=DMAX("field to show","queryname")

 

by: dannywarehamPosted on 2005-09-28 at 04:38:31ID: 14973896

If there's only one row in your query, the criteria isn't important

 

by: pique_techPosted on 2005-09-28 at 04:45:01ID: 14973937

The problem you're running into is because Access only permits one recordsource per report -- header, detail, and footer.  

I've solved the problem you're describing by creating a small subreport to display the results I want (usually summarized in a way not supported by Access grouping) then I just put the subreport in the footer.  I suppose you could use
     =DFirst("Field1","QueryF")
as the control source for each field in the footer, but it will be a little slow (IMHO).  I prefer the subreport approach as it seems a little easier to understand/maintain (again, IMHO).  You stated you tried DFirst and it didn't work, though I'm not sure why it wouldn't -- I tested and it seemed to work properly in the detail or footer of both a form and a report.

 

by: nabil_lbPosted on 2005-09-28 at 04:50:19ID: 14973969

peter57r, I expect to get a popup input box to enter the parameters, but what I am getting is these popups and an extra one asking me to enter the query name as a parameter. I hope it is clear.
dannywareham, I tried DMAX(FieldName,Queryname), it generated an error #ERROR in the text

 

by: nabil_lbPosted on 2005-09-28 at 04:51:58ID: 14973977

and if I removed the double quotations from the DMAX, I will get square brackets around the field name and the qurey name, and they will be asked for their values as if they were parameters

 

by: pique_techPosted on 2005-09-28 at 04:58:47ID: 14974017

nabil_lb,

Are you using the quotation marks in your calls to the DFirst or DMax functions?  They're not optional.

I wasn't sure whether a Domain Aggregating function could ask for a parameter, so I went and tested it.  You can get the DA functions to ask for a parameter as follows:
     =DFirst("Field1","queryF","Filed1 = '" & [Input Parameter] & "'") for a string parameter or
     =DFirst("Field1","queryF","Filed1 = " & [Input Parameter] & "") for a numeric parameter or
     =DFirst("Field1","queryF","Filed1 = #" & [Input Parameter] & "#") for a date parameter.

 

by: nabil_lbPosted on 2005-09-28 at 04:59:34ID: 14974022

pique tech:
does it matter if the queryF is a group by query? for DFirst to run properly

 

by: pique_techPosted on 2005-09-28 at 05:00:10ID: 14974027

Small typo in my prior post
     =DFirst("Field1","queryF","Filed1 = " & [Input Parameter] & "") for a numeric parameter or
isn't exactly correct, should be
    =DFirst("Field1","queryF","Filed1 = " & [Input Parameter])

 

by: pique_techPosted on 2005-09-28 at 05:05:32ID: 14974056

I'm seeing a problem though.  You're QUERY takes the parameter, so it doesn't really matter whehter the DA function can request a parameter or not.

I'd return to my original suggestion:  create a little report that has the data you want to display from QueryF, and drop that as a subreport onto the footer of your main report.

That gets you around all the annoyance of working through how to interact with the DA functions and should still permit you to manage the parameter in the manner you're used to.

 

by: nabil_lbPosted on 2005-09-28 at 05:07:12ID: 14974063

ok, pique, I will test the issue of subreport and get back to you

 

by: pique_techPosted on 2005-09-28 at 10:46:10ID: 14977166

I'm concerned because though you accepted my answer, you assigned a C grade.  Can you advise how the solution was inadequate so I can provide better advice in the future?  Thanks.

 

by: nabil_lbPosted on 2005-09-28 at 22:48:53ID: 14981174

pique_tech
This is the first time I accept an answer and assign a grade.
So, don't worry. But the reason I chose C is because the solution was not to the question I asked it was an alternative way to reach the same target.
and if you have any advice on the norms of assigning grades in experts-exchange please tell me about it.
I am sorry again. But does the assigned grade affects the number of points?

20120131-EE-VQP-002

3 Ways to Join

30-Day Free Trial

The Experts

98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

The Experts

97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

Testimonials

"...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

Testimonials

"I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

Testimonials

"WOW! You guys have great, active, and knowledgeable people on here." moore50

Business Clients

Business Clients

In the Press

"If you’ve got a question... Experts Exchange can supply an answer.”

In the Press

"...an invaluable aid for both IT professionals and those who require tech support."

In the Press

"where IT professionals provide quick answers on just about any topic"

Business Account Plans

Loading Advertisement...