ACC97: Contents of Snapshot Viewer Control Appear Outside Control's Boundaries

ID: Q172807


The information in this article applies to:


SYMPTOMS

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

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:


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:


  15. 
        Name: snpViewer
        Top: .2"
        Left: .1667"
        Width: 5"
        Height: 2" 
  16. On the Edit menu, point to Snapshot Viewer Control Object, and then click Properties.


  17. 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.


  18. 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.


  19. 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:

Q172348 ACC97: Report Snapshots and Microsoft Snapshot Viewer

Additional query words: pra


Keywords          : FmsProb 
Version           : WINDOWS:97
Platform          : WINDOWS 
Issue type        : kbbug kbhowto 

Last Reviewed: May 13, 1999