Hullo Kchernak and everyone,
Kchernak, you wrote in your post, the same name as above, the following:
I spent some time looking through the snapview help files and ended up having to create a form with a snapshot control where I could manipulate the snapshot path property using code, and then cycle through the snp files in the folder to print the reports. Not sure its the fastest way to go, but I'm limited by the speed of the printer anyway, and I'm the only user of the application.
I am trying to do the same with no succes.
I use AccessXP.
This is what I am doing, but it boms out, error "NO OBJECt"
I have created a form with the snapshot viewer and a ref to an existing snp report in another folder, and which on open checks another folder for files. If present I check for snp files and then go over to change the SnapshotPath property of the file just identified.
Here is the code:
Dim folderspec As String, gstrFolderPath As String
Dim snpviewer As SnapshotViewer
gstrFolderPath = "C:\Rossair4"
folderspec = "C:\Rossair4"
Dim fso, f, fl, fc, s, t
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.GetFolder(folderspec)
Set fc = f.Files
For Each fl In fc
s = s & fl.Name
s = s & "<BR>"
Next
If s = "" Then
Exit Sub
Else
For Each fl In fc
t = t & fl.Name
If Right(t, 3) = "snp" Then
MsgBox "OK"
**********Boms out here
Set snpviewer = ("snapshotviewer")
' Load the selected snapshot report into the snapshot viewer control.
snpviewer.SnapshotPath = gstrFolderPath & "\" & t.Text
snpviewer.PrintSnapshot True
If Err = 2502 Then
' No report currently displayed in the snapshot viewer control.
MsgBox "Please select a report to print."
Else
Exit Sub
End If
Else
If Right(t, 3) = "xls" Then
Exit Sub
End If
End If
Next
Exit_Command2_Click:
Exit Sub
Err_Command2_Click:
MsgBox Err.Description
Resume Exit_Command2_Click
End Sub
The code boms out at ********
The error seems to be looking for a declaration to Snapshot.
PLEASE help!
Piet
Kchernak, you wrote in your post, the same name as above, the following:
I spent some time looking through the snapview help files and ended up having to create a form with a snapshot control where I could manipulate the snapshot path property using code, and then cycle through the snp files in the folder to print the reports. Not sure its the fastest way to go, but I'm limited by the speed of the printer anyway, and I'm the only user of the application.
I am trying to do the same with no succes.
I use AccessXP.
This is what I am doing, but it boms out, error "NO OBJECt"
I have created a form with the snapshot viewer and a ref to an existing snp report in another folder, and which on open checks another folder for files. If present I check for snp files and then go over to change the SnapshotPath property of the file just identified.
Here is the code:
Dim folderspec As String, gstrFolderPath As String
Dim snpviewer As SnapshotViewer
gstrFolderPath = "C:\Rossair4"
folderspec = "C:\Rossair4"
Dim fso, f, fl, fc, s, t
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.GetFolder(folderspec)
Set fc = f.Files
For Each fl In fc
s = s & fl.Name
s = s & "<BR>"
Next
If s = "" Then
Exit Sub
Else
For Each fl In fc
t = t & fl.Name
If Right(t, 3) = "snp" Then
MsgBox "OK"
**********Boms out here
Set snpviewer = ("snapshotviewer")
' Load the selected snapshot report into the snapshot viewer control.
snpviewer.SnapshotPath = gstrFolderPath & "\" & t.Text
snpviewer.PrintSnapshot True
If Err = 2502 Then
' No report currently displayed in the snapshot viewer control.
MsgBox "Please select a report to print."
Else
Exit Sub
End If
Else
If Right(t, 3) = "xls" Then
Exit Sub
End If
End If
Next
Exit_Command2_Click:
Exit Sub
Err_Command2_Click:
MsgBox Err.Description
Resume Exit_Command2_Click
End Sub
The code boms out at ********
The error seems to be looking for a declaration to Snapshot.
PLEASE help!
Piet