By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,640 Members | 2,095 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,640 IT Pros & Developers. It's quick & easy.

Has anyone come across error 2301 when printing

P: 21
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 = "*************"
Case 1
report_name = "*************"
Case 2
report_name = "************"
Case 3
report_name = "************"

right down to Case 35

Has anyone any ideas what causes this error?

Many thanks Rob
Sep 6 '07 #1
Share this Question
Share on Google+
2 Replies

P: 21
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

Expert 5K+
P: 8,434
Thanks for the info. It'll be useful if anyone else comes here with the same problem.
Sep 12 '07 #3

Post your reply

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