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

ID: Q224002


The information in this article applies to:

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 this to be a problem in the Microsoft products listed at the beginning of this article.


MORE INFORMATION

Steps to Reproduce Behavior

CAUTION: Following the steps in this example will modify the sample database Northwind.mdb. You may want to back up the Northwind.mdb file and perform these steps on a copy of the database.

Create Form with Snapshot Control

  1. Open the sample database Northwind.mdb.


  2. Select the Catalog report.


  3. On the File menu, click Save As/Export.


  4. In the Save As dialog box, click To an External File or Database, and then click OK.


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


  6. Create a new blank form.


  7. On the Insert menu, click ActiveX Control.


  8. Select Snapshot Viewer Control 8.0, and then click OK.


  9. Set the following properties for the snapshot control:


  10. 
       Name: SnapV
       Left: 0
       Top: 0
       Width: 4.5
       Height: 6
       Zoom: 50% 
  11. On the File menu, click Save. In the Form name box, type Form1, and then click OK.


Reproduce the Errors

  1. Right-click the Snapshot control. On the shortcut menu, point to Snapshot Viewer Control Object, and then click Properties.


  2. Click Browse. Browse to C:\My Documents, and then select Catalog.snp. Click Open, and then click OK.


  3. On the View menu, click Form View.

    Note that the Snapshot control does not contain Catalog.snp.


  4. On the View menu, click DesignView.


  5. On the View menu, click Properties, and then click the Other tab.


  6. Cut and paste the contents of the SnapshotPath property, and then move to another property.


  7. In the Debug window, type the following line, and then press ENTER:


  8. 
    Forms("Form1").Controls("SnapV").SnapshotPath="C:\My Documents\Catalog.snp" 
  9. Create a new module and type the following procedure:


  10. 
    Sub SetSnapshotPath()
       Dim s As SnapshotViewer
       Set s = Forms("Form1").SnapV.Object
       s.SnapshotPath = "C:\My Documents\Catalog.snp"
    End Sub 
  11. In the Debug window, type the following line, and then press ENTER:


  12. 
    SetSnapshotPath 

Additional query words: pra


Keywords          : kbdta 
Version           : WINDOWS:97
Platform          : WINDOWS 
Issue type        : kbbug 

Last Reviewed: May 6, 1999