Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

finding and disecting filenames - Importing to Access

Status
Not open for further replies.

bhoran

MIS
Nov 10, 2003
272
US
I am importing data into a database from .txt the file is always named the same way with the exception of the last 4 charaters defining the period name e.g Expenses_Export0604.txt for period 6 2004.
Expenses_Export0704.txt for period 7 2004

I want the user to be able to select a period for upload via a form using combo boxes. I then want to automatically look for that file in the given directory, upload it and shift the original file to another "Archived" folder (if transfer is successful).

Thanks in advance.

I am actually away until next week so should prob have waited but I am sure there will be some good advice when I get back.
 
Ben,

You'll be able to work this out using the Dir function and the Mid function. Have a go when you return, and post your code here if you're having trouble.

Jeremy

==
Jeremy Wallace
AlphaBet City Dataworks
Access Databases for Non-Profit Organizations

Please post in the appropriate forum with a descriptive subject; code and SQL, if referenced; and expected results. See thread181-473997 for more pointers.
 
In addition to the great advice from JeremyNYC, there are also Regular Expression and FileSystemObject options as well.

When you get back, we can get together, see what you have done and where your problems are, and we can go from there.

Good Luck
--------------
As a circle of light increases so does the circumference of darkness around it. - Albert Einstein
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top