I Posted yesterday in tables with regarding to txt. file import into access and a #NUM! error.
Having sorted this issue, I am now pursuing automating the import of my .txt log files into access
The code I have so far is below, this is working well with the exception of the file reference which is currently set by the code
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Private Sub Command1_Click()
DoCmd.RunSQL "DELETE * FROM LogTemp_Tbl;"
DoCmd.TransferText acImportDelim, ("LOG"), ("LogTemp_Tbl"), ("EVENT LOG.txt")
End Sub
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
What I would like to do is be able to set the file name in the above code as a variable that is inserted via the file open dialog box, i.e if I am not around the task is as simple as possible for someone else to perform who does not have knowledge of VB.
Any help would be greatley appreciated, could I ask that any code help is explained in terms of what the separate lines of code do, I am as interested in understanding in learning how a solution works as I am in sorting the issue
Thanks
Having sorted this issue, I am now pursuing automating the import of my .txt log files into access
The code I have so far is below, this is working well with the exception of the file reference which is currently set by the code
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Private Sub Command1_Click()
DoCmd.RunSQL "DELETE * FROM LogTemp_Tbl;"
DoCmd.TransferText acImportDelim, ("LOG"), ("LogTemp_Tbl"), ("EVENT LOG.txt")
End Sub
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
What I would like to do is be able to set the file name in the above code as a variable that is inserted via the file open dialog box, i.e if I am not around the task is as simple as possible for someone else to perform who does not have knowledge of VB.
Any help would be greatley appreciated, could I ask that any code help is explained in terms of what the separate lines of code do, I am as interested in understanding in learning how a solution works as I am in sorting the issue
Thanks