[AccessD] Printing Issue

jm.hwsn jm.hwsn at gmail.com
Mon Mar 28 14:32:03 CDT 2011


Dan, et al.
The issue is the report.
The original report was quite complex.
There are 19 question types, which means a section could be all one type or
a combination of several types.  The original report had sub-reports for
each type and when printed would unhide and expand the appropriate
sub-report. The 20th sub-report is a complex report that has a sub-report
for each question type.  When the report is printed the sub-reports would
unhide and expand as needed.  Sometimes a sub-report could be used two or
more times in different sequences to create a section.  The section with
more than one question type I call "various" because of various types of
questions.
The first 3 sections of the questionnaire have various questions.  For
example, Q1 is a 3-response question with custom responses, Q2 is a fill-in
question, Q3 is a 5-response question with custom response, Q4 is
self-lookup question with a combo box, Q4 is a two response question with
custom response, etc.

I separated the first report and made 20 different reports.  So when
printing, it cycles through the reports and prints them as needed.  I have
found that to able to print the entire questionnaire, I need to print each
section in succession because each section is a different report. If I open
the print menu by-itself the entire questionnaire prints.  If I "log in" as
a researcher, I get the same problem when it attempts to print the second
section report.

I'm getting closer to solving this conundrum. But, I'm sure where to go from
here.

Thanks,
Jim

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Dan Waters
Sent: Friday, March 25, 2011 10:21 AM
To: 'Access Developers discussion and problem solving'
Subject: Re: [AccessD] Printing Issue

Hi Jim - good description!

I'm going to guess that the problem may not be the form, but the way the
report is being called from the user interface, or the report itself.

Try:

  1) Create a backup copy of the report.
  2) Create a new completely blank report with the same name, and try
printing it from the user interface.  If the user interface can print this
blank report, then the report is the issue.
  3) If the report is simple, rebuild it from scratch but don't copy any
controls or code from the original report.  
  4) Otherwise, eliminate code and controls from the report one by one to
see what the issue is.  Start by commenting out all code on the report.

Also, if you have code which sets the recordset for the report, put that
code into a separate procedure and call that procedure from both your form
and the user interface.  This will eliminate differences that might be
happening when you open the report from two different places.

Also, in the code IDE under Tools | Options | General, set Error Trapping to
Break on All Errors - might help while you're debugging.

Also, be sure that you don't have any extra Access processes running when
you are debugging.

HTH,
Dan

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jm.hwsn
Sent: Friday, March 25, 2011 9:46 AM
To: 'Access Developers discussion and problem solving'
Subject: [AccessD] Printing Issue

Sorry this is so long.
Access 2007, Windows XP
I have a complex database with 71 tables, 450 queries, 118 forms, 58 reports
and 195 modules.
This database is self contained, there are no linked tables except when I
temporarily link to an Excel spreadsheet to import data.
It is a psychological questionnaire which will be used by a training
organization to assist with lowering the attrition rate for their students.
When fully deployed there will be approximately 450 students (every 2 or 3
months) answering the questionnaire and getting feedback on their strengths
and improvement areas.

I have four levels of security: student, cadre (instructors, supervisors,
unit administrator, researcher, researcher admin and IT admin).
Everything works except for one thing.  In the researcher and above levels,
I have a pop-up form to print the questionnaire.
When I attempt to print I get an ambiguous response:
"Microsoft Office Access has encountered a problem and needs to close. We
are sorry for the inconvenience."
I click "don't send" it shuts down, creates a new copy and opens the new
copy.

If I open the form by itself, the report prints as it should. If I use the
user interface to open the report I get the above message.
>From the splash screen, a login form (which stays open all the time) is
opened and is used to determine the security level of the user.
The appropriate user interface is then opened. On the Researcher interface a
button opens the print menu form.

The questionnaire consists of several sections.  Each section could have
several different types of questions (different sub forms) or it could be
one type of question.  Each section has a separate report.  The current
questionnaire has 13 active sections. It's designed to have a maximum of 20.
In the code behind the print button, I open a record set, and loop through
each section and then print the appropriate report.

What I've tried to solve the problem:
Changed the record set from a saved query to a SQL string Decompiled -
recompiled Compacted and repaired.
Created a new database and imported all the objects from the old one and
then reconfigured the new file.
Created a new database and imported all objects except the offending form.
compacted/repaired.. Decompiled/compiled. imported a copy of the form.
Deleted the form from the database and imported a copy from a previous
version

I'm at a loss as to what to try next.
Any suggestions?

MTIA

Jim



--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com


-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com




More information about the AccessD mailing list