hello,
I have written the following code to import values from a text file and append them to a table. The problem I am having is that the date value form the text file gets changed after being imported to the table. The date field in the table is formatted to accept medium dates. Can someone please let me know what is wrong?
Dim ReadedData, Db, RST, Counter
Set Db = CurrentDb
Set RST = Db.OpenRecordset("SELECT * FROM PDALOGS")
With RST
Open "C:\Documents and Settings\Entanglement\Desktop\pdalog.txt" For Input As #1
.AddNew
.Fields(0) = Now
While Not EOF(1)
.AddNew
For Counter = 1 To 7
Input #1, ReadedData
.Fields(Counter) = ReadedData
Next
.Update
Wend
Close
.Close
End With
Here is what a row in the text file looks like:
1 1 7/12/07 0 1 0 0
I have written the following code to import values from a text file and append them to a table. The problem I am having is that the date value form the text file gets changed after being imported to the table. The date field in the table is formatted to accept medium dates. Can someone please let me know what is wrong?
Dim ReadedData, Db, RST, Counter
Set Db = CurrentDb
Set RST = Db.OpenRecordset("SELECT * FROM PDALOGS")
With RST
Open "C:\Documents and Settings\Entanglement\Desktop\pdalog.txt" For Input As #1
.AddNew
.Fields(0) = Now
While Not EOF(1)
.AddNew
For Counter = 1 To 7
Input #1, ReadedData
.Fields(Counter) = ReadedData
Next
.Update
Wend
Close
.Close
End With
Here is what a row in the text file looks like:
1 1 7/12/07 0 1 0 0