i've got 2 tables tblCompany and tblHrtasks and on the form:
when i choose the company name, the subform gives the details of employee attached to that company; but there is a combo box in the subform for choosing the employee and i want a filter on the combo (on the subform) so that it displays only employees those are attached to the company (based on the selection before from the master form)
following is the code in the afterupdate of the combo in the main form:
Private Sub Combo14_AfterUpdate()
'Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[id] = " & Str(Nz(Me![Combo14], 0))
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
[Forms]![form1]![hr_tasks_frm].Visible = True
End Sub
this displays all the employees belong to the selected company from the combo [combo14] on the main form (Form1)
Now:
on the subform [Forms]![form1]![hr_tasks_frm] i've got a combo [combo18] in which i want to filter only those employees belong to the selected in combo14;
this will help user to choose fast the employees and do the necessary human resources tasks on them
help very much appreciated
thanks