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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top