Hi, if I do a transfertext in a macro, the data loads correctly, however, when I use VBA attached to a button, the rows are loaded, but the fields are blank. What am I doing wrong?
VBA from button;
Private Sub Command0_Click()
DoCmd.RunSQL "DELETE MSC_load.* FROM MSC_load"
DoCmd.TransferText asImportFixed, "MSC_ddmmyy_ssss Import Specification", "MSC_Load", "C:\MSC.txt", False
End Sub
(delete command works correctly)
Macro Variables;
Transfer Type Import Fixed Width
Specification Name MSC_ddmmyy_ssss Import Specification
Table Name MSC_Load
Has Field Names C:\MSC.txt
HTML Table Name
Code Page
(HTML... and Code... are left blank)
VBA from button;
Private Sub Command0_Click()
DoCmd.RunSQL "DELETE MSC_load.* FROM MSC_load"
DoCmd.TransferText asImportFixed, "MSC_ddmmyy_ssss Import Specification", "MSC_Load", "C:\MSC.txt", False
End Sub
(delete command works correctly)
Macro Variables;
Transfer Type Import Fixed Width
Specification Name MSC_ddmmyy_ssss Import Specification
Table Name MSC_Load
Has Field Names C:\MSC.txt
HTML Table Name
Code Page
(HTML... and Code... are left blank)