mattkorguk
04-02-2008, 03:23 AM
I've tried searching on FileSearch, found a few thing but nothing which showed if it's possible to refer to a table instead of just placing "C:\My Documents" or similar into the .Lookin section.
We have a table [tblScanning] with holds only 1 entry, this is a path, and the one I'd like to refer to in the Filesearch .Lookin.
I keep receiving a Type mismatch on this...I'm sure I must be doing something wrong!
If (Not IsNull([Mtg Id])) Then
Dim db As Database
Dim First As Recordset
Set db = CurrentDb()
Set First = db.OpenRecordset([Table].[tblScanning].[Scan-Path])
First.MoveFirst
With Application.FileSearch
.NewSearch
.LookIn = First & Me.Case_Id
.FileName = "*Fee Agreement*"
If .Execute > 0 Then
Me.FeeAgreement = True
Else
Me.FeeAgreement = False
End If
End With
Else
Me.FeeAgreement = False
End If
Thank you.
We have a table [tblScanning] with holds only 1 entry, this is a path, and the one I'd like to refer to in the Filesearch .Lookin.
I keep receiving a Type mismatch on this...I'm sure I must be doing something wrong!
If (Not IsNull([Mtg Id])) Then
Dim db As Database
Dim First As Recordset
Set db = CurrentDb()
Set First = db.OpenRecordset([Table].[tblScanning].[Scan-Path])
First.MoveFirst
With Application.FileSearch
.NewSearch
.LookIn = First & Me.Case_Id
.FileName = "*Fee Agreement*"
If .Execute > 0 Then
Me.FeeAgreement = True
Else
Me.FeeAgreement = False
End If
End With
Else
Me.FeeAgreement = False
End If
Thank you.