Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I have two final problems in creating my report.......

Status
Not open for further replies.

NeilBelgium

IS-IT--Management
Sep 18, 2001
87
BE
I have two final problems in creating my report.......

I want my report to be based on two queries.
The first is simple, and is completed, and look something like this:

QuestionNumber Boss Peer Self Average
1 5 4 4 4.3
2 4 4 4 4
3 3 3 3 3
4 "" "" "" ""
5 "" "" "" ""
6 "" "" "" ""

this goes on for 24 questions, i'm sure you get the idea.
HOWEVER, I also need to build a query that will give totals for the columns
for six questions at a time. all 24 is easy, but how split into sixes, and
produce a query that looks like this:

QuestionGroup Boss Peer Self Average
1 -6 5 4 4 4.3
7-12 4 4 4 4
13-18 3 3 3 3
19-24 4 4 5 3.7
(i know-the numbers don't add up but it's not important!!)

that's major (to me) problem one.

Problem two is that the report,a s well as displaying the results from this
second query , I'm going to add some written reports.

Let's take the first group of questions. If the overall average is between
1-3, I want one written report to appear. If the average is 4-5, another
written report is produced.
Now, I have all these written reports, but in what format do I store them,
and how on earth do I call upon them in the access report?

muchos thankyous to anyone that can assist!!

yours, neil






 
In your query, if you want to recieve a total value, you can create multiple sub queries, don't place Boss, Pier, And Self in the query have it sum the average and do a WHERE on the Question # of Between 1 and 6.

Then just do sub reports for each query to tie onto your report page.

I believe what you can do for the second problem is make a dummy report. Use the sub reports that you have created for the category of questions. Create an unbound text (WELL CALL IT TOTALAVG) box and have the Control Source = to:
= [SUBRPT Name].Report![TextBoxName] + [SUBRPT Name2].Report![TextBoxName] (ETC ETC ETC)

Then on your coding, have it open up the report and on the ONCLOSE event pass that value in the textbox to a PublicModule (We'll call the public module TESTTHEVALUE). So it will be as follows
(For These Purposes, we will call the dummy report TestMyValues)

BUTTON CODING:
Dim stDocName as string

stDocName = "TestMyValues"

Docmd.OpenReport stDocName, acViewPreview
Docmd.Close stDocName

if totalavg > 3 then
stDocName = "3.01 Or Greater Report"
else
stDocName = "3 or Less Report"
end If

DoCmd.OpenReport stDocName, acViewNormal

MODULE:
Public TESTTHEVALUE as Double

TestMyValues ONCLOSE Event:
TESTTHEVALUE = TOTALAVG

I don't know if this will work to what effect you need, but from the items you have given me I was able to duplicate and it all worked fine for me. Let me know @ darkstar@pbtk.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top