Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Pull total in report from unassociated query

Posted on 2014-08-08
4
Medium Priority
?
215 Views
Last Modified: 2014-08-08
Hi.  I have an equipment/maintenance Tracking database.  I've created a form with 2 unbound fields.  The fields are referenced in a date field on a query to create a date range for a report run.  The report displays/prints all data that meets my criteria within the specified date range.  (All open maintenance due within date range).  I'm being asked for a percentage of open records due within my date range over all open maintenance records.   For instance; In August I have 30 records due but I have 248 open maintenance records total so I need to display the percentage (12%) in the report footer of the existing report.  Best I can think of is usign a subrepoert but this gives me a of of extra paper.  Is there any way to pull the total open count into this report that is already specific to only a range of data?

thanks
0
Comment
Question by:valmatic
  • 3
4 Comments
 
LVL 74

Accepted Solution

by:
Jeffrey Coachman earned 1000 total points
ID: 40249205
Put a textbox on your Report.

Set the controlsouce to something like this:

=Dsum("SomeField","SomeQuery")

example:
=Dsum("Sales","qrySales")

JeffCoachman
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 40249219
...also you can provide a criteria to your Dsum...

But yu may be OK with what I posted above.

and example of criteria would be:
=Dsum("Sales","qrySales", "State=" & "'" & YourState & "'")
...for a text criteria

=Dsum("Sales","qrySales", "EmployeeID=" & YourEmployeeID)
...for a numerical criteria


JeffCoachman
0
 
LVL 7

Author Closing Comment

by:valmatic
ID: 40249252
Hi Jeff,  I keep forgetting about the "D" commands for totaling.  I used Dcount instead and it worked great.  thanks
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 40249357
Great!

Glad I could help...

Enjoy your weekend.

;-)

JeffCoachman
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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.
Instead of error trapping or hard-coding for non-updateable fields when using QODBC, let VBA automatically disable them when forms open. This way, users can view but not change the data. Part 1 explained how to use schema tables to do this. Part 2 h…
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 …
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

578 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