Hey ya'll<br><br>I want to take a table from one database and<br>transfer it, data & structure into another database<br>in a new location.<br><br>Here's were I am so far<br><br><br>' Declair variables for the Database and Recordset.<br>Dim SOURCEdb As Database<br>Dim DESTINdb As Database<br>Dim SOURCErs As Recordset<br>Dim DESTINrs As Recordset<br><br>Private Sub cmdTableApp_Click()<br> Call CopyTable<br>End Sub<br><br>Private Sub Form_Load()<br> ' Declare a strings for storing database locations<br> Dim dbLoc1 As String<br> Dim dbLoc2 As String<br> <br> ' Open dbTest to the location on the drive,<br> ' where the database is.<br> dbLoc1 = "c:\VBDocs\Projects\Copying Tables\DAO_source.mdb"<br> dbLoc2 = "s:\Public\DRamsahai\DAO_destin.mdb"<br> <br> Set SOURCEdb = OpenDatabase(dbLoc1)<br> Set DESTINdb = OpenDatabase(dbLoc2)<br> <br> Set SOURCErs = SOURCEdb.OpenRecordset("SOURCErs1", dbOpenTable)<br> SOURCErs.MoveFirst<br> Call ShowFields<br>End Sub<br><br>Sub ShowFields()<br> txtID.Text = SOURCErs!ID<br> txtInfo.Text = SOURCErs!info<br> txtNumber.Text = SOURCErs!Number<br>End Sub<br><br>Sub CopyTable()<br> DESTINrs = SOURCErs.Clone<br> DESTINdb.TableDefs.Append(DESTINrs)<br>End Sub<br><br>Private Sub Form_Unload(Cancel As Integer)<br> DESTINrs.Close<br> DESTINdb.Close<br> SOURCErs.Close<br> SOURCEdb.Close<br>End Sub<br><br><br>I know that the CopyTable function doesn't work<br>but there must be a way to add the DESTINrs recordset<br>to the DESTINdb database. Or maybe I'm doing this <br>completely wrong. Any advise would be helpful.<br><br>Thanks in advance =-) <p>Deryck Ramsahai<br><a href=mailto
Rams.bna@bundy.com>DRams.bna@bundy.com</a><br><a href= > </a><br>It takes two to lie. One to lie and one to listen.