Microsoft KB Archive/172807

From BetaArchive Wiki
< Microsoft KB Archive
Revision as of 10:06, 21 July 2020 by X010 (talk | contribs) (Text replacement - """ to """)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Article ID: 172807

Article Last Modified on 1/20/2007



APPLIES TO

  • Microsoft Access 97 Standard Edition



This article was previously published under Q172807

Moderate: Requires basic macro, coding, and interoperability skills.


SYMPTOMS

A Microsoft Access form displays the contents of a Snapshot Viewer ActiveX control outside the boundaries of the control.

CAUSE

This behavior occurs when the SnapshotPath property of the Snapshot Viewer control is set to a report snapshot file and one of the following is true:

  • You resized the form section by dragging the bottom edge of the section up and over the bottom edge of the Snapshot Viewer ActiveX control.


-or-

  • You resized the Snapshot Viewer ActiveX control so the top of the control overlapped the navigation buttons in the control.


RESOLUTION

Method 1

Clear the SnapshotPath property of the Snapshot Viewer ActiveX control. To view a report in the Snapshot Viewer control in form view, set the SnapshotPath property of the Snapshot Viewer control using Visual Basic for Applications code in the Load event of the form. The following sample event procedure demonstrates this method:

   Sub Form_Load()
      Me!snpViewer.SnapshotPath = "C:\My Documents\Sales by Category.snp"
   End Sub
                

This is the recommended method.

Method 2

Minimize and restore the form window.

Note: This method may not resolve the display problem in all situations.

STATUS

Microsoft has confirmed this to be a problem in Microsoft Access 97.

MORE INFORMATION

Steps to Reproduce Problem


  1. Open the sample database Northwind.mdb.
  2. On the View menu, point to Database Objects, and then click Reports.
  3. Click the Sales by Category report.
  4. On the File menu, click Save As/Export.
  5. In the Save As dialog box, click "To an External File or Database," and then click OK.
  6. In the "Save Report 'Sales by Category' In" dialog box, click Snapshot Format (*.snp) in the Save as Type list.
  7. Locate the folder C:\My Documents, type Sales by Category.snp in the File Name box, and then click Export.
  8. Open a new, unbound form in Design view.
  9. Set the Height property of the Detail section of the form to 2.5".
  10. Set the Width property of the form to 5.4".
  11. On the Insert menu, click ActiveX Control.
  12. Click "Snapshot Viewer Control, version 8.0," and then click OK.
  13. Select the Snapshot Viewer control by clicking on it.
  14. Set the following properties for the Snapshot Viewer control:

        Name: snpViewer
        Top: .2"
        Left: .1667"
        Width: 5"
        Height: 2"
                        
  15. On the Edit menu, point to Snapshot Viewer Control Object, and then click Properties.
  16. Set the Snapshot Path property to "C:\My Documents\Sales by Category.snp," and then click OK.

    The Sales by Category report should appear in the Snapshot Viewer control.
  17. Resize the Detail section of the form by dragging the bottom edge of the section up and over the Snapshot Viewer control.

    Note that you cannot drag the bottom edge of the Detail section up past the bottom edge of the control on the form; the height of the Detail section cannot be less than the sum of the Top and Height properties of the control.
  18. Drag the bottom edge of the Detail section back to its original location.

    Note that Microsoft Access repaints the section incorrectly by displaying sections of the report contained in the Snapshot Viewer control.


REFERENCES

For more information about the Snapshot Viewer ActiveX control, see Microsoft Snapshot Viewer Help (Snapview.hlp), which is installed with the Microsoft Snapshot Viewer.

For more information about report snapshots and Microsoft Snapshot Viewer, please see the following article in the Microsoft Knowledge Base:

172348 ACC97: Report Snapshots and Microsoft Snapshot Viewer


Additional query words: pra

Keywords: kbbug kbhowto KB172807