It depends on what you want to do. You could create a module and use something like this:
Sub Main()
Dim rst1 As ADODB.Recordset
Dim sql As String
'Query
sql = "SELECT Table1.TableX From Table1"
'The important part
Set rst1 = New ADODB.Recordset
rst1.ActiveConnection = CurrentProject.Connection
rst1.CursorType = adOpenStatic
rst1.Open sql, options:=adCmdText
Do Until rst1.EOF
sql3 = "Insert into Table2 (Field1) values ('" & rst1![FieldX] & " ')
DoCmd.RunSQL sql3
Loop
End Sub
This is a simple example on how to run a query and then write those results into another table.
Hope this helps
Regards
M
Such is Life!
|