D
dtatham
In MS Access I am creating a project(.adp). I want to be able to transfer
text from a cd-rom drive to my access database as a table.
I have created my code as follows:
Private Sub Command1_Click()
Dim strFilter As String
Dim strInputFileName As String
strFilter = ahtAddFilterItem(strFilter, "All Files (*.*)", "*.*")
strInputFileName = ahtCommonFileOpenSave( _
Filter:=strFilter, OpenFile:=True, _
DialogTitle:="Please select an input file...", _
Flags:=ahtOFN_HIDEREADONLY)
DoCmd.TransferText acImportDelim, "", "tblEubdata" & Format(Date, "yyyy"),
strInputFileName, True, ""
End Sub
Now this works fine as long as I copy the file from d: to c: and alter my
schema.ini file to be the same as the file I just copied from d.
Question: Is there a way to automate this to just be able to select the
file I want to transfer and have it copy to my c: drive and alter my
schema.ini?? The way I understand it the text file and the schema.ini have
to be in the same directory and that the schema.ini filename must match that
of the text file.
Any ideas??
text from a cd-rom drive to my access database as a table.
I have created my code as follows:
Private Sub Command1_Click()
Dim strFilter As String
Dim strInputFileName As String
strFilter = ahtAddFilterItem(strFilter, "All Files (*.*)", "*.*")
strInputFileName = ahtCommonFileOpenSave( _
Filter:=strFilter, OpenFile:=True, _
DialogTitle:="Please select an input file...", _
Flags:=ahtOFN_HIDEREADONLY)
DoCmd.TransferText acImportDelim, "", "tblEubdata" & Format(Date, "yyyy"),
strInputFileName, True, ""
End Sub
Now this works fine as long as I copy the file from d: to c: and alter my
schema.ini file to be the same as the file I just copied from d.
Question: Is there a way to automate this to just be able to select the
file I want to transfer and have it copy to my c: drive and alter my
schema.ini?? The way I understand it the text file and the schema.ini have
to be in the same directory and that the schema.ini filename must match that
of the text file.
Any ideas??