By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,073 Members | 1,218 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,073 IT Pros & Developers. It's quick & easy.

Parse a path for a file name in Access

P: n/a
CK
Hi All,
How do I parse a file path in Access for return the file name?
Example
c:\somefolder\somefolder\somefolder\somefolder\som efolder\somefolder\somefolder\someFile.xls
I want to query a table with this value and just return 'someFile.xls" no
matter how long or short the path is. I can do this in SQL Server, but i am
new to Access SQL and I can not figure it quite out.
Any help is always appreciated.

Cheers,
~ck
Feb 6 '08 #1
Share this Question
Share on Google+
1 Reply


P: n/a
On Wed, 06 Feb 2008 20:23:34 GMT, CK wrote:
Hi All,
How do I parse a file path in Access for return the file name?
Example
c:\somefolder\somefolder\somefolder\somefolder\som efolder\somefolder\somefolder\someFile.xls
I want to query a table with this value and just return 'someFile.xls" no
matter how long or short the path is. I can do this in SQL Server, but i am
new to Access SQL and I can not figure it quite out.
Any help is always appreciated.

Cheers,
~ck
Mid([FieldName],InStrRev([FieldName],"\")+1)
should return everything after the rightmost "\".
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
Feb 6 '08 #2

This discussion thread is closed

Replies have been disabled for this discussion.