B
Barry M
I am running the following code to check the existence of
a back end database before linking to it:
Dim fs
Set fs = Application.FileSearch
With fs
.LookIn = strDestDbPath
.FileName = strDestDbY
If .Execute() > 0 Then
strYrA = strYrS
Else
strYrA = Format(strYrS) - 1
End If
End With
The problem is that .Execute() is always > 0 (indicating
file is found) even if the file it is searching for does
not exist. The else part never happens.
I thought the code was working in the past.
Am I doing something wrong or is Access possibly corrupted?
Thanking anyone who can enlighten me.
Barry M
a back end database before linking to it:
Dim fs
Set fs = Application.FileSearch
With fs
.LookIn = strDestDbPath
.FileName = strDestDbY
If .Execute() > 0 Then
strYrA = strYrS
Else
strYrA = Format(strYrS) - 1
End If
End With
The problem is that .Execute() is always > 0 (indicating
file is found) even if the file it is searching for does
not exist. The else part never happens.
I thought the code was working in the past.
Am I doing something wrong or is Access possibly corrupted?
Thanking anyone who can enlighten me.
Barry M