How do i use the docmd in vb. I have an Access table, and I want to use the DoCmd.TransferText. I set a reference to Microsoft Access Object Library, . But don't know what to do next. Below is the code I have so far, but nothing is imported.
Dim IndexDb As Database
strDBName = "LCC" & Format(Now, "yyyymmdd"
OpenDatabase = "C:\Test\" & strDBName ".mdb"
DoCmd.TransferText acImportFixed, "ImportSpec", "Import", "C:\Index.txt", False, ""
Name "C:\Index.txt" As "C:\Index.done"
Dim IndexDb As Database
strDBName = "LCC" & Format(Now, "yyyymmdd"
OpenDatabase = "C:\Test\" & strDBName ".mdb"
DoCmd.TransferText acImportFixed, "ImportSpec", "Import", "C:\Index.txt", False, ""
Name "C:\Index.txt" As "C:\Index.done"