learning vba
New Member
- Joined
- Nov 20, 2016
- Messages
- 8
Hi all,
I need some help in importing a text file into ms access, this file is fixed lenght however there are 3 length types
first column is "Frequency" starts from 1 length 2
based on this field the length of other columns are determined
eg:
Case1:
if "Frequency" field is 01 then the
currency starts from 6 and length is 3
rate starts from 12 and length is 8
Case2:
if "Frequency" field is 02 then the
currency starts from 15 and length is 3
rate starts from 28 and length is 8
Case3:
if "Frequency" field is 03 then the
currency starts from 7 and length is 3
rate starts from 35 and length is 8
If i use a saved specs for case 1, it reads and loads the entire file and messes up with the colums
is there a Ms Access vba code that i can use to read the text file and import only rows where Frequency" field= 01 or 02
i tried usinig the .ini file but couldn't get through.
the txt files are huge hence cannot i have to import only specific rows
Thank you in advance
I need some help in importing a text file into ms access, this file is fixed lenght however there are 3 length types
first column is "Frequency" starts from 1 length 2
based on this field the length of other columns are determined
eg:
Case1:
if "Frequency" field is 01 then the
currency starts from 6 and length is 3
rate starts from 12 and length is 8
Case2:
if "Frequency" field is 02 then the
currency starts from 15 and length is 3
rate starts from 28 and length is 8
Case3:
if "Frequency" field is 03 then the
currency starts from 7 and length is 3
rate starts from 35 and length is 8
If i use a saved specs for case 1, it reads and loads the entire file and messes up with the colums
is there a Ms Access vba code that i can use to read the text file and import only rows where Frequency" field= 01 or 02
i tried usinig the .ini file but couldn't get through.
the txt files are huge hence cannot i have to import only specific rows
Thank you in advance