Private Sub Command0_Click()
Dim Rs As New ADODB.Recordset
Dim Conn As New ADODB.Connection
Set Conn = CurrentProject.Connection
Rs.Open "select name from Comp_temp1", Conn, adOpenKeyset, adLockOptimistic
Do While Not Rs.EOF Debug.Print Rs.Fields(0)
Rs.MoveNext
Loop
Rs.Close
Rs.Open "select name from Comp_temp2", Conn, adOpenKeyset, adLockOptimistic
Do While Not Rs.EOF Debug.Print Rs.Fields(0)
Rs.MoveNext
Loop
Set Rs = Nothing
Set Conn = Nothing
End Sub作者: andymark 时间: 2006-9-27 23:52
在立即窗口里显示的