R
Ray
I have a database in Access 2000 format.
Some of out computers have been upgraded to Runtime 2007.
All works well except the following code. Runtime 2007 sees it is a "illegal
operation" and shuts down. It works fine in all other versions of Runtime and
Access.
The code is supposed to count the files in a folder and display the file
count in the caption of a command button.
Any Suggestions?
Dim FileName
Set fs = Application.FileSearch
With fs
.LookIn = "\\mmpdsnas01a\apps$\Quality\Specialty\DMR Supporting
Documents\" & Me.[DMR #]
.FileName = "*.*"
If .Execute > 0 Then
Me.Command222.Caption = .FoundFiles.Count & " Supporting Documents"
Me.Command222.ForeColor = vbBlack
Else
Me.Command222.Caption = "No Supporting Documents"
Me.Command222.ForeColor = vbRed
End If
End With
Some of out computers have been upgraded to Runtime 2007.
All works well except the following code. Runtime 2007 sees it is a "illegal
operation" and shuts down. It works fine in all other versions of Runtime and
Access.
The code is supposed to count the files in a folder and display the file
count in the caption of a command button.
Any Suggestions?
Dim FileName
Set fs = Application.FileSearch
With fs
.LookIn = "\\mmpdsnas01a\apps$\Quality\Specialty\DMR Supporting
Documents\" & Me.[DMR #]
.FileName = "*.*"
If .Execute > 0 Then
Me.Command222.Caption = .FoundFiles.Count & " Supporting Documents"
Me.Command222.ForeColor = vbBlack
Else
Me.Command222.Caption = "No Supporting Documents"
Me.Command222.ForeColor = vbRed
End If
End With