Private Sub Command0_Click()
Dim strSQL As String, rec As DAO.Recordset, rs As DAO.Recordset
Set rs = CurrentDb.OpenRecordset("TransferTest")
strSQL = "SELECT SN, PN, Description, [Module Number], [Module Type] FROM RXBoardTransfer"
Set rec = CurrentDb.OpenRecordset(strSQL)
Do Until rec.EOF
With rs
.AddNew
!SN = rec!SN
!PN = rec!PN
![Description] = rec![Description]
![Module Number] = rec![Module Number]
![Module Type] = rec![Module Type]
.Update
End With
rec.MoveNext
Loop
rec.Close
rs.Close
Set rec = Nothing
Set rs = Nothing
End Sub
|