I am trying to link a txt file (which is in a CSV format) to my database, and then create the fields needed. There are only three needed:
second field - user
third field - date
fourth field - time
all the users are defaulted.
I get the error stating that the fields are not defined, and I'm not sure the file is even linking.
Any help would be greatly appreciated!
Private Function dbOpen()
Dim db As Database, tdf As TableDef
Dim strfile, strfolder As String
Dim fdt As String
Set db = CurrentDb
fdt = Format(Date, "yymm"![Wink ;) ;)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
strfolder = "\\xorl001\groups\esd\fleet_mon_diag\tools\pdcdb\data\rdsct\"
strfile = "in" & fdt & ".txt"
Set tdf = db.CreateTableDef(strfile)
tdf.Connect = "text;" & strfolder
db.TableDefs.Append tdf
RefreshDatabaseWindow
End Function
second field - user
third field - date
fourth field - time
all the users are defaulted.
I get the error stating that the fields are not defined, and I'm not sure the file is even linking.
Any help would be greatly appreciated!
Private Function dbOpen()
Dim db As Database, tdf As TableDef
Dim strfile, strfolder As String
Dim fdt As String
Set db = CurrentDb
fdt = Format(Date, "yymm"
strfolder = "\\xorl001\groups\esd\fleet_mon_diag\tools\pdcdb\data\rdsct\"
strfile = "in" & fdt & ".txt"
Set tdf = db.CreateTableDef(strfile)
tdf.Connect = "text;" & strfolder
db.TableDefs.Append tdf
RefreshDatabaseWindow
End Function