Hi all,
First of all, I am not a very skilled Access programmer, and I mostly re-use bits of code I find on help sites.
My problem is the following: I have a main form with a combo box which allows me to select a staff member, and a subform which then shows tasks for this member. I use the "link child field" and "link master field" property of the subform.
However, in the list, there is also "ALL" as a possiblity, in which case I would like to show everybody's tasks and not just one person's. I am a bit confused as to how to proceed. I have thought at using filters, however I already use them with a chechbox, which allows to see all tasks or only todo tasks(non-completed). I would think that using filters everywhere would be a good way to obtain a horrible mixture which is why I'm asking if there is another route. I use the following code for the checkbox:
The same code is inserted in Private Sub Form_Current().
Thank you for any help!
Rémi
First of all, I am not a very skilled Access programmer, and I mostly re-use bits of code I find on help sites.
My problem is the following: I have a main form with a combo box which allows me to select a staff member, and a subform which then shows tasks for this member. I use the "link child field" and "link master field" property of the subform.
However, in the list, there is also "ALL" as a possiblity, in which case I would like to show everybody's tasks and not just one person's. I am a bit confused as to how to proceed. I have thought at using filters, however I already use them with a chechbox, which allows to see all tasks or only todo tasks(non-completed). I would think that using filters everywhere would be a good way to obtain a horrible mixture which is why I'm asking if there is another route. I use the following code for the checkbox:
Code:
Private Sub ShowCompletedTasks_Click()
If Me.ShowCompletedTasks.Value Then
With Me.subfrmTasks.Form
.FilterOn = False
End With
Else
With Me.subfrmTasks.Form
.Filter = "Completed Is Null"
.FilterOn = True
End With
End If
End Sub
Thank you for any help!
Rémi