ACC97: Cannot Enter Five Digits in File Print Dialog Box on Windows NT (224158)



The information in this article applies to:

  • Microsoft Access 97, when used with:
    • the operating system: Microsoft Windows NT 4.0

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.

Modification Type:MajorLast Reviewed:4/7/2006
Keywords:kbQFE KBHotfixServer kbbug kbfix KB224158