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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Append Import

Status
Not open for further replies.

JoeF

Technical User
Nov 30, 2000
54
US
I was trying to import a file and append it directly into a table already existing in an access database. I couldn't find a way to do this; I could only get my import to create a new table. Afterwards, I would append the new table to the already existing table(an extra step I was trying to avoid). I found a solution in creating a macro. When I set up a macro to run this procedure, it appended the import file into an existing table without deleting any of that existing data.

I am just curious - how does the macro complete this append and is it possible to do it without a macro? Why couldn't I do it manually?
 
Append is simply that it adds records to an existing table.
There is no automatic provision to look for matches (existing records) and do something with them. Either delete them or update them or whatever.

You can do this with VBA code.
But you will have to import them to a table first so the VBA code will have 2 tables to compare.
Now then you can specify which field to compare to find duplicates or matches and then do whatever you want with them.

Last you can delete the newly imported table.
Now in code this could all happen at once and very fast so no one would really know what’s going on.

First though you need to make a copy of the table in case it get messed up while you are trying to work out the code.


DougP, MCP
dposton@universal1.com

Ask me how Bar-codes can help you be more productive.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top