3 replies
by asidonline
If you are comfortable with code this will be fairly straightforward.
The first thing to do is create an import specification. To do this, do a manual import and before you finish, click on the advanced button and save the specification.
Thenin a new module do something like this:
Docmd.TransferText acImportFixed, "Daily Import Specification","tbl_ImportTo","c:\source.txt"
Look up the access help for details on the elements.
As for the file name, i'm assuming it's name is something like ddmmyy.txt (290800.txt). If this is the case, you can programatically work out which file to import:
Public sub sub_Import
Dim vls_file as string
vls_file = "c:\" & Format(Date,"ddmmyy") & ".txt"
'This creates a value like c:\290800.txt
Docmd.TransferText acImportFixed, "Daily Import Specification","tbl_ImportTo","c:\290800.txt"
End Sub
Then, you can call this procedure when the first form in the database opens up.
This should be a good starting point for you.
This discussion is closed to new replies.
Trending Web Development posts
Sort by Trending