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

Exporting one record

Status
Not open for further replies.

gossimer

Technical User
May 10, 2006
1
US
Is there a way to export just one single record out of an Access database and into another database? I've used a similar feature in ACT, and figure it must be possible in Access. (Background info -- I have a list of on-going projects and when a project is complete I want to transfer the record to a database that contains just the completed projects.)

Sorry if this question seems basic, I just have not been able to figure it out.

Thanks!
 
I assume thet the "other database" is also an Access database. Link the table from the other database into the one containing your data and then create a query of the form
Code:
INSERT INTO OtherDataBaseTable (fld1, fld2, fld3, ...)
Select fld1, fld2, fld3, ...
From LocalTable
Where PrimaryKeyField = 'SomeValue'

[small]No! No! You're not thinking ... you're only being logical.
- Neils Bohr[/small]
 
Yes, it is. One way would be to use IN to reference an external database:
[tt]SELECT tblPersons.PersonsKey INTO tblPersonsX IN "C:\Docs\Tek-Tips.mdb"
FROM tblPersons
WHERE tblPersons.PersonsKey=90[/tt]
 
Not a problem ... but won't that SQL create a new table rather than just appending a record to an existing one?

[small]No! No! You're not thinking ... you're only being logical.
- Neils Bohr[/small]
 
Yes. I suppose the implication is to an existing table, but I did not catch that.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top