Microsoft KB Archive/172807

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

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.



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.



Steps to Reproduce Problem
 Open the sample database Northwind.mdb. On the View menu, point to Database Objects, and then click Reports. Click the Sales by Category report. On the File menu, click Save As/Export. In the Save As dialog box, click "To an External File or Database," and then click OK.</li> In the "Save Report 'Sales by Category' In" dialog box, click Snapshot Format (*.snp) in the Save as Type list.</li> Locate the folder C:\My Documents, type Sales by Category.snp in the File Name box, and then click Export.</li> Open a new, unbound form in Design view.</li> Set the Height property of the Detail section of the form to 2.5".</li> Set the Width property of the form to 5.4".</li> On the Insert menu, click ActiveX Control.</li> Click "Snapshot Viewer Control, version 8.0," and then click OK.</li> Select the Snapshot Viewer control by clicking on it.</li>  Set the following properties for the Snapshot Viewer control: <pre class="fixed_text">   Name: snpViewer Top: .2"   Left: .1667" Width: 5"   Height: 2" </li> On the Edit menu, point to Snapshot Viewer Control Object, and then click Properties.</li> 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.</li> 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.</li> 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.</li></ol>

<div class="references_section">