先调用表1的记录,再存入表2
Public gDbCon As New ADODB.Connection
Public gDbrec As New ADODB.Recordset
Dim str_sql1 ,str_sql2 ,str_temp
As String
str_sql1 = "SELECT * FROM 表1 WHERE 条件
Set gDbrec = New ADODB.Recordset
gDbrec.CursorLocation = adUseClient
gDbrec.Open str_sql, gDbCon, adOpenDynamic, adLockReadOnly
str_temp= gDbrec ("字段").value
str_sql2 = "UPDATE 表2 SET 对应字段='" &
str_temp & "' "
gDbCon.Execute str_sql2