Access Importing csv daily files into access 2007

Joined
Apr 4, 2017
Messages
1
Reaction score
0
I'm having a little trouble with creating VBA code to import csv files. I get a new csv every day to import into an existing table in my access database, and I wish to create a code that will import the specific file for a day with the press of a button on a form.

All the files have a similar name: YYYYMMDDHHNNSS_TimeDetailYYYYMMDDb.csv. The way that I wish to search for the file to import is by typing a date into a textbox on the form and searching for a matching date for the YYYYMMDD portion of the file. I've tried a few different codes, but I keep getting a message saying "This file cannot be found. Please check the name and try again". It's strange because I can import it just fine when using the manual access option.

Is there any advice that you can give me?
 
I suggest to import a file with the simplest name, for example, 1.csv. In case of success, the next step is obvious.
Good luck,
Chereda
 
Back
Top