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:
- 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
- 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.
- In the "Save Report 'Sales by Category' In" dialog box, click Snapshot
Format (*.snp) in the Save as Type list.
- Locate the folder C:\My Documents, type Sales by Category.snp
in the File Name box, and then click
Export.
- Open a new, unbound form in Design view.
- Set the Height property of the Detail section of the form to 2.5".
- Set the Width property of the form to 5.4".
- On the Insert menu, click ActiveX Control.
- Click "Snapshot Viewer Control, version 8.0," and then click OK.
- Select the Snapshot Viewer control by clicking on it.
- Set the following properties for the Snapshot Viewer control:
Name: snpViewer
Top: .2"
Left: .1667"
Width: 5"
Height: 2"
- On the Edit menu, point to Snapshot Viewer Control Object, and then
click Properties.
- 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.
- 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.
- 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