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

importing data from another table

Status
Not open for further replies.

rcpbaby1

MIS
Apr 22, 2005
13
GB
Hi

I have just finished a DB ready to split onto a network. The problem I have is that I created 2 temporary standalone DB's for 2 users to capture data in while the main DB was being created. Now I need to get their data into the main DB, but the table is not identicle (I have added some fields since developing the standalone DB). Also the record ID's are autonumber PK.

Any idea's?

TIA

RCP
 
I would link the backend tables to the frontend databases one at a time, then in the frontend, write a sub that creates two recordsets, one based upon the linked backend table, and one based upon the frontend table.

At that point, you can just create a little do loop like:

Do while not rsFrontend.eof
rsBackend.addnew
'then for each field that exists in both recordsets
'(Don't process the autonumber field)
rsbackend.Fields("<fieldname>") = rsFrontend.fields("<fieldname>")
rsbackend.fields.....etc, etc, etc
rsbackend.update
rsfrontend.movenext
Loop

Anyway, that's what I'd do.

Tranman

Adam was not alone in the Garden of Eden, however,...much is due to Eve, the first woman, and Satan, the first consultant.
Mark Twain
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top