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
STATUSMicrosoft has confirmed this to be a problem in the Microsoft products listed
at the beginning of this article.
MORE INFORMATIONSteps 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
- 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.
- 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.
- Create a new blank form.
- On the Insert menu, click ActiveX Control.
- Select Snapshot Viewer Control 8.0, and then click OK.
- Set the following properties for the snapshot control:
Name: SnapV
Left: 0
Top: 0
Width: 4.5
Height: 6
Zoom: 50%
- On the File menu, click Save.
In the Form name box, type Form1, and then click OK.
Reproduce the Errors
- Right-click the Snapshot control. On the shortcut menu, point to Snapshot Viewer Control Object, and then click Properties.
- Click Browse. Browse to C:\My Documents, and then select Catalog.snp. Click Open, and then click OK.
- On the View menu, click Form View.
Note that the Snapshot control does not contain Catalog.snp.
- On the View menu, click DesignView.
- On the View menu, click Properties, and then click the Other tab.
- Cut and paste the contents of the SnapshotPath property, and then move to another property.
- In the Debug window, type the following line, and then press ENTER:
Forms("Form1").Controls("SnapV").SnapshotPath="C:\My Documents\Catalog.snp"
- 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
- In the Debug window, type the following line, and then press ENTER:
SetSnapshotPath
Additional query words:
pra
Keywords : kbdta
Version : WINDOWS:97
Platform : WINDOWS
Issue type : kbbug
|