Dan Waters
dwaters at usinternet.com
Thu Jan 7 11:50:51 CST 2010
Larry, You can use FileScriptingObject to do a lot of file management tasks pretty easily. First, set a reference to Microsoft Scripting Runtime (scrrun.dll) In your procedure: Dim fso as Object Set fso = CreateObject("Scripting.FileSystemObject") '-- get full file path stgFileName = fso.GetFileName(stgFullPathToFile) You can review all the FileSystemObject methods here: http://msdn.microsoft.com/en-us/library/6tkce7xa%28VS.85%29.aspx Hope this helps, Dan -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Lawrence Mrazek Sent: Thursday, January 07, 2010 11:00 AM To: Access Developers discussion and problem solving Subject: [AccessD] Common Dialog Hi Folks: I'm the API from http://www.mvps.org/access/api/api0001.htm, and can't seem to remember how to ONLY retrieve the filename (not the filename and path using the API. I suppose that if I know the directory, I can use some functions to trim off the directory path, but in this case I might not always be looking for the files in a default directory. Any hints/guidance would be appreciated. Larry Mrazek lmrazek at lcm-res.com 314-432-5886 -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com