Hi Folks,
I am not sure what I am doing wrong here. I have this code that works perfectly to import a file:
Private Sub Command0_Click()
DoCmd.TransferText acImportDelim, "270 Import Specification", "Temp", "C:\test270.txt"
End Sub
As soon as I try to add a few lines of codes pasted below to attempt to grab the name of the file to be imported from a textbox on the form the command button is on to launch the code, it bombs:
Private Sub Command0_Click()
Dim FileImportName As String
FileImportName = Text1
DoCmd.TransferText acImportDelim, "270 Import Specification", "Temp", ('"& FileImportName &"')
End Sub
Any help would be greatly appreciated. I have tried so many different things at this point to get it to work, that I figure I must be missing something completely.
Thanks,
Joe
I am not sure what I am doing wrong here. I have this code that works perfectly to import a file:
Private Sub Command0_Click()
DoCmd.TransferText acImportDelim, "270 Import Specification", "Temp", "C:\test270.txt"
End Sub
As soon as I try to add a few lines of codes pasted below to attempt to grab the name of the file to be imported from a textbox on the form the command button is on to launch the code, it bombs:
Private Sub Command0_Click()
Dim FileImportName As String
FileImportName = Text1
DoCmd.TransferText acImportDelim, "270 Import Specification", "Temp", ('"& FileImportName &"')
End Sub
Any help would be greatly appreciated. I have tried so many different things at this point to get it to work, that I figure I must be missing something completely.
Thanks,
Joe