Microsoft Knowledge Base Article
This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved.
Terms
of Use |
Trademarks
Article ID: 224158 - Last Review: January 24, 2007 - Revision: 4.2
ACC97: Cannot Enter Five Digits in File Print Dialog Box on Windows NT
This article was previously published under Q224158
SYMPTOMS
In Microsoft Access 97 on a computer running Microsoft Windows NT 4.0, you can only enter a maximum of 3 digits (instead of 5 digits) in the
Pages From and
To text boxes under the
Print Range option group in the
Print dialog box. On a computer running Windows 2000, you can only enter a maximum of 4 digits.
This behavior occurs once Access 97 Service Release 2 (SR-2) has been applied to the machine.
RESOLUTION
You can use Visual Basic for Applications (VBA) code or a macro to workaround this problem. Here is an example of a VBA procedure that you could use:
Sub PrintSpecificPages()
Dim StartPage, EndPage As Integer
Dim ObjName As String
On Error GoTo PrintPages_Err
'set the name of the report you want to print.
ObjName = InputBox("Type the name of the report you " & _
"would like to print", "Select Report")
'set the page numbers you want to from and to.
StartPage = CInt(InputBox("Type the number of the first page you " & _
"would like to print", "Starting Page", 1))
EndPage = CInt(InputBox("Type the number of the last page you " & _
"would like to print", "Ending Page", 1))
DoCmd.Echo False
DoCmd.OpenReport ObjName, acViewPreview ' open the report
DoCmd.PrintOut acPages, StartPage, EndPage ' print the report
DoCmd.Close acReport, ObjName ' close the report
DoCmd.Echo True
Exit Sub
PrintPages_Err:
If Err.Number = 2103 Then
ObjName = InputBox("The name you typed is not a valid name." & _
vbCrLf & "Type the name of the report you " & _
"would like to print", "Select Report")
Resume
Else
MsgBox Err.Number & " - " & Err.Description
End If
End Sub
Here is an example of a macro you can use to workaround the problem:
Action
--------------------------------
SelectObject
PrintOut
Close
Macro Action Arguments
-------------------------------
SelectObject
Object Type: Report
Object Name: Order Details
In Database Window: Yes
PrintOut
Print Range: Pages
Page From: 1001
Page To: 1002
Close
Object Type: Report
Object Name: Order Details
Save: No
STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.
APPLIES TO
- Microsoft Access 97 Standard Edition, when used with:
| kbqfe kbhotfixserver kbbug kbfix KB224158 |
Community Feedback System
Very often, it takes hours to solve a problem. Very often, you've looked high
and low, and have tried a lot of solutions. When you finally found it, chances
are, it was because someone else helped you. Here's your chance to give back.
Use our community feedback tool to let others know what worked for you and what
didn't.
Please also understand that the community feedback system is not warranted to be
correct, it's simply a system that we've built to let people try and help each
other. If something in a feedback response doesn't make sense to you, or you're
not comfortable making changes that the feedback talks about (like registry
edits), please consult a professional.
Thank you for using kbAlertz.com Feedback System.
-- Scott Cate
Be the first to leave feedback, to help others about this knowledge base
article.
(Optional) Name
(Optional)
Public URL Or Email
Comments
No
HTML -- Text Only Please