I am trying to make a database to keep track of projects.
I have two combo boxes on my form, one for clients, one for projects and a lot of text boxes, for specific project details (budget, milestones etc).
The first combo box helps to filter the second one, so that if I pick a client I'll only see projects related to that client in the second combo box. Furthermore, if I select a project the correct record shows on my form.
It all works like a charm, and that is mostly thanks to the amazing help of this forum!!!! Thanks!
But here is the problem, it currently works because the form only uses a single table as a source. I need to use multiple tables though. I tried out all kind of variations but it keeps coming up with the same error in the code.
I can understand, why this is hapening but I do not know what the solution is. Here is the code:
Private Sub Combo84_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[Project Name] = '" & Me![Combo84] & "'"
Me.Bookmark = rs.Bookmark
Me.Combo84.Requery
End Sub
The line "Me.Bookmark = rs.Bookmark" is what gives the trouble, but I do not know how to rewrite it... any suggestions?
I have two combo boxes on my form, one for clients, one for projects and a lot of text boxes, for specific project details (budget, milestones etc).
The first combo box helps to filter the second one, so that if I pick a client I'll only see projects related to that client in the second combo box. Furthermore, if I select a project the correct record shows on my form.
It all works like a charm, and that is mostly thanks to the amazing help of this forum!!!! Thanks!
But here is the problem, it currently works because the form only uses a single table as a source. I need to use multiple tables though. I tried out all kind of variations but it keeps coming up with the same error in the code.
I can understand, why this is hapening but I do not know what the solution is. Here is the code:
Private Sub Combo84_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[Project Name] = '" & Me![Combo84] & "'"
Me.Bookmark = rs.Bookmark
Me.Combo84.Requery
End Sub
The line "Me.Bookmark = rs.Bookmark" is what gives the trouble, but I do not know how to rewrite it... any suggestions?