T
Tlm
Hello All,
I'm trying to something I thought would be very simple - copy a recordset -
but it's proving to be extremely difficult!!!! What am I doing wrong???
Here's my code:
Dim dbs As Database
Dim rst As Recordset
Dim sql As String
Set dbs = CurrentDb
sql = "SELECT Field1, Field2, Field3 FROM [Table1]" _
& "WHERE ((ID)=[Forms]![MainForm1]![Subform1]![ID])"
Set rst = dbs.OpenRecordset(sql)
sql = "Insert Into Table1 (Field1, Field2, Field3)"
dbs.Execute (sql)
I get a return error message indicating there are too few parameters in "Set
rst = dbs.OpenRecordset(sql)"
Is there a simpler way to capture/copy a Recordset so I can then insert it
into another record?
Any/All help with this will be greatly appreciated!!!
Tom
I'm trying to something I thought would be very simple - copy a recordset -
but it's proving to be extremely difficult!!!! What am I doing wrong???
Here's my code:
Dim dbs As Database
Dim rst As Recordset
Dim sql As String
Set dbs = CurrentDb
sql = "SELECT Field1, Field2, Field3 FROM [Table1]" _
& "WHERE ((ID)=[Forms]![MainForm1]![Subform1]![ID])"
Set rst = dbs.OpenRecordset(sql)
sql = "Insert Into Table1 (Field1, Field2, Field3)"
dbs.Execute (sql)
I get a return error message indicating there are too few parameters in "Set
rst = dbs.OpenRecordset(sql)"
Is there a simpler way to capture/copy a Recordset so I can then insert it
into another record?
Any/All help with this will be greatly appreciated!!!
Tom