JoannieJefferson
asked on
.docmd.transfertext via vb
I am using VB 6 and referencing MS Access to transfer a text file into a table.
below is a section of code i am using:
Dim ACObject As Access.Application
Set ACObject = CreateObject("Access.Appli cation")
With ACObject
.OpenCurrentDatabase filepath:="" & App.Path & "\some_db.mdb "
.DoCmd.TransferText acImportDelim, "ReaderSpec", "Hierarchy-20050310", strFilename, True
End With
i have never used the .docmd.transfertext..... and i am not sure what i need to specify in each of the fields.
i get an error message that states : Runtime error 3625....The text file specification 'ReaderSpec' does not exist . You can not import,export or link using the specification.
What is the correct syntax to use?
ok, in the specification area where i have 'ReaderSpec' . I have placed an empty string in its place (""), now i get an error (runtime 2391) that says my field names do not exist in the destination table.
I have all the field names in the table. I am not sure why i get this error.
below is a section of code i am using:
Dim ACObject As Access.Application
Set ACObject = CreateObject("Access.Appli
With ACObject
.OpenCurrentDatabase filepath:="" & App.Path & "\some_db.mdb "
.DoCmd.TransferText acImportDelim, "ReaderSpec", "Hierarchy-20050310", strFilename, True
End With
i have never used the .docmd.transfertext..... and i am not sure what i need to specify in each of the fields.
i get an error message that states : Runtime error 3625....The text file specification 'ReaderSpec' does not exist . You can not import,export or link using the specification.
What is the correct syntax to use?
ok, in the specification area where i have 'ReaderSpec' . I have placed an empty string in its place (""), now i get an error (runtime 2391) that says my field names do not exist in the destination table.
I have all the field names in the table. I am not sure why i get this error.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER