Hello everyone!
You have been a great help so far, so I hope you can help me with my newest problem to.
I am using the following code:
Private Sub Savebutton_Click()
Dim db As DAO.Database
Dim rst As DAO.Recordset
Dim rst2 As DAO.Recordset
Set db = CurrentDb
Set rst = db.OpenRecordset("Table1", dbOpenDynaset)
'Do stuff with rst
rst.close
Set rst2 = db.OpenRecordset("Table2", dbOpenDynaset)
'Filter for combobox ID
rst2.Filter = "ID = '" & Me.F1.Column(4) & "'"
rst2F1 = rst2.OpenRecordset
'Do stuff with rst2
Set db = Nothing
Set rst2 = Nothing
Set rst = Nothing
End Sub
Now I am always getting the error message about a datatype conflict highlighting the rst2F1 = rst2.OpenRecordset part
I am confused about this ... Why am I not abled to use the filtered 2nd recordset?
Thank you for your help!
You have been a great help so far, so I hope you can help me with my newest problem to.
I am using the following code:
Private Sub Savebutton_Click()
Dim db As DAO.Database
Dim rst As DAO.Recordset
Dim rst2 As DAO.Recordset
Set db = CurrentDb
Set rst = db.OpenRecordset("Table1", dbOpenDynaset)
'Do stuff with rst
rst.close
Set rst2 = db.OpenRecordset("Table2", dbOpenDynaset)
'Filter for combobox ID
rst2.Filter = "ID = '" & Me.F1.Column(4) & "'"
rst2F1 = rst2.OpenRecordset
'Do stuff with rst2
Set db = Nothing
Set rst2 = Nothing
Set rst = Nothing
End Sub
Now I am always getting the error message about a datatype conflict highlighting the rst2F1 = rst2.OpenRecordset part
I am confused about this ... Why am I not abled to use the filtered 2nd recordset?
Thank you for your help!