473,406 Members | 2,816 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Access Runtime 2010 intermittently CRASHED in application.printers

I have NO problem in changing the Printer in 2003 ADP (connected to SQL 2005) working in Access 2010 Full Version but when I run the ADP/ADE file into another Server (Windows Server 2003 SP2) with Access Runtime 2010 I got intermittent error and the application shutdown.

I tried different codes from different forums on how to change the printer but it intermittenly crashed in "application.printers"

Here are the codes I tried:

VERSION 1:===============================
Expand|Select|Wrap|Line Numbers
  1. Dim rpt As Report
  2. DoCmd.OpenReport "reportName", acViewPreview, , ,acHidden
  3. Set rpt = Reports("reportName")
  4. Set rpt.Printer = Application.Printers(strPrinterName)
  5. DoCmd.OpenReport "reportName", acViewNormal 
  6. DoCmd.Close acReport, "reportName"
VERSION 2:===============================
Expand|Select|Wrap|Line Numbers
  1. strDefaultPrt = Application.Printer.DeviceName
  2. Set Application.Printer = Application.Printers(strPrinterName)
  3. DoCmd.OpenReport "reportName", acViewNormal 
  4. Set Application.Printer = Application.Printers(strDefaultPrt )
VERSION 3:====================
Expand|Select|Wrap|Line Numbers
  1. strDefaultPrinter = Application.Printer.DeviceName
  2. Call SetSpecificPrinter(strPrinterName)
  3. DoCmd.OpenReport "reportName", acViewNormal 
  4. Call SetSpecificPrinter(strDefaultPrinter)
  5.  
  6.  
  7. Sub SetSpecificPrinter(tmpPrinterName)
  8. Dim prn As Printer
  9. Dim blnPrinterSet As Boolean
  10.  
  11. For Each prn In Application.Printers
  12.  
  13.    If prn.DeviceName = tmpPrinterName Then
  14.  
  15.        Set Application.Printer = prn
  16.  
  17.        blnPrinterSet = True
  18.        Exit For
  19.    End If
  20. Next prn
  21.  
  22.     If Not blnPrinterSet Then MsgBox "Invoice Printer NOT found.", vbCritical
  23.  
  24. Set prn = Nothing
  25.  
  26. End Sub
===============

Access 2010 crashed everytime it sees "application.printers"

Here's the error I got, or sometimes no error message at all:

"The exception unknown software exception (0xc0000417) occured in the application at location 0x785520f0"

When I hit OK button, application will be close.

Need suggestions on how to fix this intermittent error.... Please...

Thanks in advance!
Oct 27 '11 #1
0 1528

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: John Phelan | last post by:
I was under the impression that if I package my software with Access Runtime and made certain that end-users opened my program with the "/runtime switch", they would be using MY installed version...
3
by: Siggy | last post by:
I have made an Access runtime installation with Installshield Express 5. It works good, but I can't figure out how to implement the runtime swich in the shortcut. Any ideas?? Sigurd
0
by: Brett | last post by:
We have an access runtime application 2002 that has been tested on a number of xp machines and works correctly. the same application was installed on an xp machine that appeared to install...
5
by: Nathan Bloom | last post by:
Hi, I have a secured database that runs fine on the computer the database is installed on. I have several workstations with access runtime installed that also need access to the database. ...
3
by: Bob Dydd | last post by:
Hi Everybody I have an Access 2000 db with a setup for inserting images in records. I am using the image path only with the actual images stored elswhere on the hard disc. This works perfectly...
3
by: Simple Man | last post by:
We have a citrix server that users will be signing into from a remote location. One application is an Access database. Right now, lan users are using the Access 2003 runtime to run these...
1
by: cddeboer | last post by:
I am using MS-Access XP and am using the following syntax Set Application.Printer = Application.Printers("PrinterName") to change the default printer. Then when I go to check the associated...
3
by: enough2Bdangerous | last post by:
access runtime error 3011 on docmd.openreport -------------------------------------------------------------------------------- Access database (file format 2002-2003) generates reports with...
5
by: spulliam | last post by:
I have created a database on my computer which has the full application of Access 2007. The users I want to have access will be using Access runtime 2007. I have split the database and copied...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.