jm.hwsn
jm.hwsn at gmail.com
Fri Mar 25 10:34:07 CDT 2011
Thanks Dan. Let me work on these... I'll let you know what I find out. 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