当前位置: 动力学知识库 > 问答 > 编程问答 >

vba - MS Access acImportDelim Specifcation not being used

问题描述:

I'm new to Access VBA, but I have managed to create a specification for my DB to import a txt and this works when being used manually, but fails when used in the following VBA. When I say fails, I mean it's as if there is no specification used, but the import "works", it just brings in a big mess, but the "correct" data.

Private Sub Command2_Click()

DoCmd.TransferText acImportDelim, "Specification what I Made", TableName, FilePath & Filename, False

End Sub

I've been through everything I can think of, but I'm stuck.

Can anyone help?

网友答案:

Although it feel a little like I'm talking to myself here, the answer was:

DoCmd.TransferText acImportDelim,

Should have read

DoCmd.TransferText acImportFixed,

Obviously.

分享给朋友:
您可能感兴趣的文章:
随机阅读: