Microsoft KB Archive/224002

= ACC: Can't Insert or View .SNP File in Snapshot Viewer Control =

Article ID: 224002

Article Last Modified on 1/24/2007

-

APPLIES TO


 * Microsoft Access 97 Standard Edition

-



This article was previously published under Q224002





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



SYMPTOMS
You may experience one or more of the following problems when you try to set or view the SnapshotPath property of the Snapshot Viewer ActiveX control, even though the path that you use is for a valid snapshot (.snp) file.

The snapshot is not displayed in the control, and you do not receive an error message.

-or-

You receive the following error messages:

There was a problem referencing a property or method of the object.

Check the component's documentation for information on the properties and methods it makes available for Automation operations.

-or-

Run-time error '-2147467259(800004005)':

Method 'SnapshotPath' of object 'ISnapshotViewer' failed.

-or-

Run-time error '-2147467259(800004005)':

Automation error.

NOTE: In the last two items, the number following "Run-time error" may vary.



CAUSE
You tried to set or view the SnapshotPath property on a computer that has Microsoft Internet Explorer version 5.0 installed.



RESOLUTION
You can avoid this problem by including "File" before the path. For example, instead of setting the path as:

C:\My Documents\Catalog.snp

Use the following:

File://C:\My Documents\Catalog.snp



STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.



Steps to Reproduce Behavior
CAUTION: If you follow the steps in this example, you modify the sample database Northwind.mdb. You may want to back up the Northwind.mdb file and follow these steps on a copy of the database.

Create Form with Snapshot Control
 Open the sample database Northwind.mdb. Select the Catalog 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 'Catalog' In dialog box, from the Save in list, click My Documents. In the Save as type list, click Snapshot Format (*.snp). In the File name box, type Catalog.snp, and then click Export.</li> Create a new blank form.</li> On the Insert menu, click ActiveX Control.</li> Select Snapshot Viewer Control 8.0, and then click OK.</li>  Set the following properties for the snapshot control: <pre class="fixed_text">  Name: SnapV Left: 0 Top: 0 Width: 4.5 Height: 6 Zoom: 50% </li> On the File menu, click Save. In the Form name box, type Form1, and then click OK.</li></ol>

Reproduce the Errors
<ol> Right-click the Snapshot control. On the shortcut menu, point to Snapshot Viewer Control Object, and then click Properties.</li> Click Browse. Browse to C:\My Documents, and then select Catalog.snp. Click Open, and then click OK.</li> On the View menu, click Form View.

Note that the Snapshot control does not contain Catalog.snp.</li> On the View menu, click DesignView.</li> On the View menu, click Properties, and then click the Other tab.</li> Cut and paste the contents of the SnapshotPath property, and then move to another property.</li>  In the Debug window, type the following line, and then press ENTER: Forms("Form1").Controls("SnapV").SnapshotPath="C:\My Documents\Catalog.snp" </li>  Create a new module and type the following procedure: Sub SetSnapshotPath Dim s As SnapshotViewer Set s = Forms("Form1").SnapV.Object s.SnapshotPath = "C:\My Documents\Catalog.snp" End Sub </li>  In the Debug window, type the following line, and then press ENTER: SetSnapshotPath </li></ol>

Additional query words: component s -2147467259(800004005) ISnapshotViewer

Keywords: kbbug kbpending KB224002

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.