473,320 Members | 1,876 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,320 software developers and data experts.

Has anyone come across error 2301 when printing

I have a visual basic 6 program that prints about 30 different reports from an access database on command but 2 or 3 of them fail to print with a message box stating 2301 and the report name and an OK button.
When you press OK the program 'bombs'
the report prints quite happily from access itself and i am completely stumped

the code is nothing more than
Private Sub Command1_Click(Index As Integer)

Select Case Index

Case 0
Select Case Display_this_one

Case 0
report_name = "*************"
Print_Report
Case 1
report_name = "*************"
Print_Report
Case 2
report_name = "************"
Print_Report
Case 3
report_name = "************"
Print_Report

right down to Case 35

Has anyone any ideas what causes this error?

Many thanks Rob
Sep 6 '07 #1
2 918
sorted it
and thought people might be interested the error was caused by a mismatch of the name in the print_report name and the access report name
Sep 11 '07 #2
Killer42
8,435 Expert 8TB
Thanks for the info. It'll be useful if anyone else comes here with the same problem.
Sep 12 '07 #3

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

Similar topics

14
by: kosuke | last post by:
I keep getting the following error/warning message when using the python based program getmail4: /usr/lib/python2.3/optparse.py:668: FutureWarning: %u/%o/%x/%X of negative int will return a...
27
by: garyolsen | last post by:
In C++ what kind of unexpected conditions should be handled as exceptions? Besides dividing by 0, bad memory allocation, what're the most popular exceptions? When should not use exception,...
18
by: Microsoft | last post by:
When I try this in my code I alwas get an errormessage: "Object reference not set to an instance of an object" Dim g As System.Drawing.Graphics g.DrawString("Test", New Font("Arial", 12,...
4
by: Együd Csaba | last post by:
Hi, the restoration of a dump stops at the line above. The dump was created with pgsql 7.3.2 and I need to pump it into a 7.4.3 one. Should anybody tell me what the problem can be and how I can...
1
by: kCura | last post by:
First off, I'm sorry if this isn't the write thread to post this message but I couldn't find one dedicated to System.Drawing. I'm developing an intranet application in VB.NET that uses a Hosted...
0
by: imranabdulaziz | last post by:
Dear All, I am making web application using Asp.net C#(Visual Studio2005). And Sql server 2005 as a back End I generated local mode report but as there was no printing option available . I assign...
1
by: Alexander Higgins | last post by:
>>Thanks for the response.... Point Taken but this is not the case. Thus, if a person writes a text file on her or his computer and does not use UNICODE to save it, the current code page is...
3
by: DontB3 | last post by:
Hi, I'm new in this forum, and i hope someone can help. I'm creating an automatic application that transfer a database from Access -> DBF -> Oracle. When My App try to execute Insert SQL...
21
by: array7 | last post by:
I have been reading a lot of archived threads about "page-break- inside: avoid" not supported by IE5, IE6 IE55, IE7 and Firefox (Mozilla), which creates a really unpleasant-looking printout with...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.