Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Basic Acess Macro

Status
Not open for further replies.

kheins

Programmer
Sep 24, 2001
7
US
I am trying to create a macro in Access to delete a Table and import an excel file to create a new table. This is what I have so far but it doesn't work.

DeleteObject Type=Table, Name=TEST
TransferText Type=Import Delimited, Name=TEST, File=c:\karl\1.csv, Field Names=No, Specification and HTML are blank

Any ideas?
K K H H
K K H H
K K HHHHHH
K K H H
K K H H
 
Hi!

Do you know where it fails? Does it delete the table and then fail to import or does it not even delete the table?

Jeff Bridgham
 
I have gotten it to Delete the old file and import the new and run the matching query. It is now failing on the unmatched query. K K H H
K K H H
KKK HHHH
K K H H
K K H H
 
Another option you have is to use the Import Text Wizard and create a Spec that can be used each time the file is brought in. I have found those .CSV files to be a little tricky if you don't create a spec for the Import.

Sean
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top