refer to event procedure subreport

G

Guest

i've created a report which pages through results in a query, and then added
a subreport that pages through results in another query.
the sub report calls an event procedure 'on page', but when it is withing
the mainreport, the event procedure isnt triggered. i know the sub report is
paging because it's other fields get populated when i page the main report,
it's just the fields that are calulated within the event procedure that arent
working.
(i'm not very clued up with access but need to do this one job asap)
does anyone have any advice please?
vauneen
 
D

Duane Hookom

A subreport doesn't do pages. There are no page header, footers, breaks, or
events. The main report grabs all of these.

Maybe you should tell us why you don't seem to be using standard controls
bound to fifelds in your report's record source.
 
G

Guest

well, i'm kind of winging it. (thanks for your response)
the client needs a report that draws info from a table called Repairs, about
the condition of motor's returned to their warehouse for fixing, there are
about 50 fields like 'shaftcondition', 'end wear'.
Then each of these fields link to another table that provides an
explaination for the field.
He doesnt want the report to consist of all the Repair fields and their
comment, only the problematic ones. So i've created a query that pulls the
fields and their comments out of the database. Then on the report based on
that query, i wrote subs that construct one long string (if shaftcondition is
not 'good' then concatinate shaftcondition and it's comment and write it to
the screen)
it's not really a working solution as i've reached the maximum number of
tables allowed in a query.
thats why i thought i could make a report based on 2 queries which i guess
would be a report with 2 subreports????
any suggestions would be valued....
vauneen
 
D

Duane Hookom

Your issue is that you are using "repairs" as field names rather than values
in a field. Your table structure is in need of normalizing.

I would use a structure similar to:

tblMotors
=================
mtrMtrID autonumber primary key
mtrName
mtr....

tblRepairTypes (50 records rather than 50 fields)
==================
repRepID autonumber primary key
repTitle "shaft condition"
repDescription "the shaft is showing unusual wear or has become out of
round"

tblMotorRepairs (1 record per motor per repair type)
================
morMoRID autonumber primary key
morMtrID links to tblMotors.mtrMtrID
morRepID links to tblRepairTypes.repRepID
morComments

This would remove a ton of your issues and make reporting, form creation,
maintenance, etc much easier.
 
G

Guest

yes - i would love to normalise the database it's not an option, i cant
change the tables, i need to make this work using the existing structure.
any ideas???
vauneen
(thanks again for the help)
 
D

Duane Hookom

I would probably write code to create a temporary, normalized table which
could then be used in the report.
 
G

Guest

yes - i though that would solve my problems but access uses action queries to
create tables, and it wont let you base a report on an action query.
vauneen
 
D

Duane Hookom

Once you run the make table (delete and append queries) you should be left
with temporary tables/records that you can use for your report.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top