access importing files with pathnames

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a browse button that captures the path and the filename of the file
that i am importing.

I store path and file name in a variable.
Is there a simpler way of just gettinh the path and filename seperately into
2 tables.

I am now using right, left and mid function to do this. But the path and the
filename changes all the time

please advice and thanks for your help!!!
 
Presumably the filename starts after the last \, so you should be able to
find it using:

Mid(strFullPath, InStrRev(strFullPath, "\") + 1)

To get the path, you'd use

Left(strFullPath, InStrRev(strFullPath, "\") - 1)
 
Back
Top