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

History keeping

Status
Not open for further replies.

h00ch

Programmer
Joined
Feb 26, 2004
Messages
4
Location
BY
hi all
is there any fast way of merging two tables(i.e., one is the history for another)?
i've found the following
1.DoCmd.TransferDatabase acImport, "Microsoft Access", "Trial5.MDB", acTable, "main", "history", False
but it creates new table (e.g., "history1") whether the "history" one already exists :(
2.DoCmd.TransferDatabase acExport, "Microsoft Access", "Trial5.MDB", acTable, "main", "history", False
but it wipes out all the previous content :(

i don't know if i'm going the right way.
any help would be groundbreaking.
 
Hi h00ch,

Use an Append Query to add one to the other (or a copy of the other if you want to keep the original), something like ..

[blue]INSERT INTO [Main] SELECT * FROM [History][/blue]

Enjoy,
Tony

------------------------------------------------------------------------------------------------------
We want to help you; help us to do it by reading FAQ222-2244 before you ask a question.
 
or use a union query.




MichaelRed
m.red@att.net

Searching for employment in all the wrong places
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top