Appending Records

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have 2 databases with the same tables. I need to merge the data from
database 2 into database 1. I created an append query but I keep getting a
"not enough space on temporary disk" error. I even limited it down to 3
months worth of data and i still get this error. if i limit it down anymore
it would take me way too long to append all the data from every table. Help!
 
Heidi

How large are your two .mdb files?

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
I don't know what that error means, but you might try using recordset
processing rather than an append query.

Dim rstIn As DAO.Recordset
Dim rstOut As DAO.Recordset
Dim dbf As DAO.Database
Dim lngFldNdx As Long

Set dbf = CurrentDb
Set rstIn = dbf.OpenRecordset("ImportTableName")
Set rstOut = dbf.OpenRecordset("MergedTableName")

If rstIn.Recordset < 1 Then
MsgBox "No Records To Process"
Exit Sub
End If

With rstIn
.MoveLast
.MoveFirst
Do While Not .EOF
rstOut.AddNew
For lngFldNdx = 0 To .Recordcount - 1
rstOut.Fields(lngFldNdx) = .Fields(lngNdx)
Next lngFldNdx
rstOut.Update
.MoveNext
Loop
End With

rstIn.Close
rstOut.Close
Set rstIn = Nothing
Set rstOut = Nothing
Set dbf = Nothing
 
Back
Top