rss0213
10-02-2009, 09:25 AM
I believe I've stumped users on another forum with this one...
I have a process that will create multiple files daily on our mainframe. These files will be semi-colon delimited and will be transmitted to my users' shared drive on a server. I will be appending a date/time stamp to each file to make them unique (e.g. file 'ABC_20091001_1200.txt'). The users have an Access DB that they want to import the data into and manage the data from there. So I would like to have a module that is executed each time the .mdb file is opened. I know I can run an event on the open of a form, but I'm not sure about the specific VBA code to use in the module. Basically, this is what the code needs to do:
1. import the data from each delimited file into the same table every time.
2. move the files to a "processed" sub-directory once the import is complete.
3. since the files will be uniquely named, the module needs to "loop" until all files in the directory have been processed.
4. this code needs to execute each time the .mdb file is opened by a user.
5. if no files are in the directory, do nothing.
I think that about covers it. Thanks in advance for the assistance.
I have a process that will create multiple files daily on our mainframe. These files will be semi-colon delimited and will be transmitted to my users' shared drive on a server. I will be appending a date/time stamp to each file to make them unique (e.g. file 'ABC_20091001_1200.txt'). The users have an Access DB that they want to import the data into and manage the data from there. So I would like to have a module that is executed each time the .mdb file is opened. I know I can run an event on the open of a form, but I'm not sure about the specific VBA code to use in the module. Basically, this is what the code needs to do:
1. import the data from each delimited file into the same table every time.
2. move the files to a "processed" sub-directory once the import is complete.
3. since the files will be uniquely named, the module needs to "loop" until all files in the directory have been processed.
4. this code needs to execute each time the .mdb file is opened by a user.
5. if no files are in the directory, do nothing.
I think that about covers it. Thanks in advance for the assistance.