Automate append of text file to mdb table

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a text file that I want to append (on a regular basis) to a history
table using Access 2000 or 2003. I am currently doing this manually (by
using "Get External Data", Import, etc.) with an Import Spec and it works
fine. How can I automate this--like setup a button for a user to push that
would perform this function (I need to use the import spec). Should I use a
macro, shd I use an
append query, or should it be done in VBA (maybe behind a button)?
Thanks for any suggestions.
 
You could use either a macro or VBA. If you create a macro that uses the
TransferText, the first box is the name of the import spec. Then have your
button run the macro. If you want to use VBA, then write use the
TransferText method of the DoCmd object. The second argument for
TransferText is the spec file name.
 
Back
Top