G
Guest
OK, currently I am using the dlookup command.
strSearch = DLookup("[File Name]", "tblImported", "[File Name] = '" &
txtFname & "'")
searches field [File Name] in tblImported where field [File Name] is equal
to txtFname.
The problem I'm running into is this; txtFname will contain a directory and
structure like s:\directory1\directory2\Excel.xls while the field [File Name]
will only contain the file's name. I want to be able to search field [File
Name] where [File Name] is equal to the last part of the string txtFname
which is the file name, and not the directory. How do I go about doing this?
I can't just put the whole directory incase they're importing the same file
from a different directory. I'm just trying to use this as a catch so Excel
spreadsheets only get imported once.
strSearch = DLookup("[File Name]", "tblImported", "[File Name] = '" &
txtFname & "'")
searches field [File Name] in tblImported where field [File Name] is equal
to txtFname.
The problem I'm running into is this; txtFname will contain a directory and
structure like s:\directory1\directory2\Excel.xls while the field [File Name]
will only contain the file's name. I want to be able to search field [File
Name] where [File Name] is equal to the last part of the string txtFname
which is the file name, and not the directory. How do I go about doing this?
I can't just put the whole directory incase they're importing the same file
from a different directory. I'm just trying to use this as a catch so Excel
spreadsheets only get imported once.