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

Importing data

Status
Not open for further replies.

teebird

Technical User
Dec 11, 2001
239
Hi everyone

I have data in one table in one database and I want to import/paste it into another table on another database. The problem is that how do I paste say 20 records in the 2nd database without them all trying to paste into the 1st field.

Many thanks
tee
 
If you want to import a table into another database then you should use the import/export option located under the File Menu, Get external data menu option.

If you have a form and want the import to be automated, here is the Access VB code to import a table automatically:

DoCmd.TransferDatabase acImport, "Microsoft Access", _
[Forms]![Processing]!Path2Data & "\Extraction.mdb", acTable, "Names", _
"Names"

This code assumes that you have created a text box on the form to allow the user to enter the path to the database, example, [Forms]![Processing]!Path2Data & "\Extraction.mdb,
and the table being imported from the Extraction.mdb is called "Names", and the name you are giving it once it has been imported into the new database is also called "Names".

I hope this helps.



 
I just had another thought. If you have a few records that you want to add to another table in another database then why don't you use an Append query to append those records into the fields that you want.

It is dangerous to cut and paste records into a table but if you have to do that, then you need to highlight all the fields before you paste the records into the fields.

maybe this will help more than my first response to you, since it seems that you don't want to import an entire table into another DB.

Hope this helps.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top