T
Tcs
I'm trying to import a text file containing file information, such as:
12/24/2005 01:00p 3,400,157,210 Mr. Magoo's-2005-12-24-0.mpg
11/10/2005 07:00p 3,400,249,370 Off-Shore Oil-2005-11-10-0.mpg
I created this file with the command:
dir > MyTextFile.txt
then I removed the extraneous lines.
1.) I'm having a problem with Access (2k) importing this data. It
gets the date and name okay, but the time and size it doesn't like. If
I open the table manually, after my importing attempt, I can enter the
time with just the "a" or "p", rather than "am" or "pm", and Access
does just fine. Likewise I can enter the filesize with imbedded
commas. I've tried adjusting the columns of data to include a
leading/trailing space, or no space. Nothing seems to work. Why does
Access not like the time and filesize from my text file? What do I
have to do to fix it?
2.) Is it possible to automate this with VBA? If so, could you
possibly push me in the right direction? I know I can use VBA to read
the file and extract the data, but how would I create the file? Or is
there some *better* way to create the info I'm after? API call(s)?
Thanks in advance,
Tom
12/24/2005 01:00p 3,400,157,210 Mr. Magoo's-2005-12-24-0.mpg
11/10/2005 07:00p 3,400,249,370 Off-Shore Oil-2005-11-10-0.mpg
I created this file with the command:
dir > MyTextFile.txt
then I removed the extraneous lines.
1.) I'm having a problem with Access (2k) importing this data. It
gets the date and name okay, but the time and size it doesn't like. If
I open the table manually, after my importing attempt, I can enter the
time with just the "a" or "p", rather than "am" or "pm", and Access
does just fine. Likewise I can enter the filesize with imbedded
commas. I've tried adjusting the columns of data to include a
leading/trailing space, or no space. Nothing seems to work. Why does
Access not like the time and filesize from my text file? What do I
have to do to fix it?
2.) Is it possible to automate this with VBA? If so, could you
possibly push me in the right direction? I know I can use VBA to read
the file and extract the data, but how would I create the file? Or is
there some *better* way to create the info I'm after? API call(s)?
Thanks in advance,
Tom