Hi,
Firstly, I am using Access 2003 to import data from a text file that is asterisk- delimited using the TransferText Action in a Macro. All is working well with the import except I need to pull a certain part of the text file's name as a yet another column apart from the columns already being imported. So as an example; If the Text file was called Employee_Car_Sales_2008_04.txt which has data (say) as below;
Jason*Welington*23
Lina*Ray*45
Victor*Adams*34
Sabrina*Rodriguez*44
Jean*Cockren*19
Steve*Inskeep*58
Then I want Access to not only load
Employee First Name & Employee Last Name & Sales
But also
Employee First Name & Employee Last Name & Sales & Month
Month should be read from the text file's name and should be 200804 in this case (i.e. the month of April 2008). Where I am coming from on this is that I will have such text files being read each month into this table and those files will carry the name of the month with the same "naming convention". So My Access DB Table should look something like;
Jason Welington 23 200804
Lina Ray 45 200804
Victor Adams 34 200804
Sabrina Rodriguez 44 200804
Jean Cockren 19 200804
Steve Inskeep 58 200804
Just as an example.. Table continues further
Jason Welington 53 200805
Lina Ray 35 200805
Victor Adams 35 200805
Sabrina Rodriguez 14 200805
Jean Cockren 10 200805
Steve Inskeep 23 200805
if it reads in a txt file called Employee_Car_Sales_2008_05.txt etc....
Hope it makes sense. Thanks a ton for looking and do let me know if you know there's a way to do it in Access. I am total novice for MS Programming .. but good with Java... and this is my first time trying to do Macros etc. in Access. Anyways, need to get this done for my boss !![]()
Thanks,
Cyberbuoy.