NJudson
Who farted?
- Local time
- Today, 05:50
- Joined
- Feb 14, 2002
- Messages
- 297
I'm using Access 2000 and I want work on some text files and there are hundreds of files and the one thing that all the filenames have in common is a date at the end like:
Filename 01-13-02.txt
Filename 01-14-02.txt
.
.
Filename 06-13-02.txt
I set something up like this:
Dim sdate as Date
Dim strFilename as String
Dim Output as String
For sdate = "01-13-02" to "06-13-02"
strFilename = "Filename " & sdate & ".txt"
Open Filename For Input Access Read As #1
Open Output For Output As #2
--code--
Next sdate
The problem I seem to have is that the filenames have the date format "01-13-02" and when I step through the code the value for sdate reads "1/13/02". How can I set this up so Access reads the date as "01-13-02". Thanks for any help.
Filename 01-13-02.txt
Filename 01-14-02.txt
.
.
Filename 06-13-02.txt
I set something up like this:
Dim sdate as Date
Dim strFilename as String
Dim Output as String
For sdate = "01-13-02" to "06-13-02"
strFilename = "Filename " & sdate & ".txt"
Open Filename For Input Access Read As #1
Open Output For Output As #2
--code--
Next sdate
The problem I seem to have is that the filenames have the date format "01-13-02" and when I step through the code the value for sdate reads "1/13/02". How can I set this up so Access reads the date as "01-13-02". Thanks for any help.