Sorry, RG, not quite sure I understand. Right now my AfterUpdate looks like this. (Note: Sorry, "EmployeeID" as stated above is actually "PersonnelID"):
HTML Code:
Private Sub cboSprintID_AfterUpdate()
' Set the Personnel combo box to be limited by the selected SprintID
Me.cboPersonnelID.RowSource = "SELECT DISTINCT tblTimeEntry.PersonnelID, tblTimeEntry.SprintID FROM tblTimeEntry " & _
" WHERE SprintID = " & Nz(Me.cboSprintID) & _
" ORDER BY PersonnelID"
Me.cboPersonnelID = Null
'enable cboPersonnelID
EnableControls
ApplyFilter
End Sub
Private Sub cboPersonnelID_AfterUpdate()
ApplyFilter
End Sub
And my subform is being filtered by the following:
HTML Code:
Private Sub ApplyFilter()
Dim strFilter As String
strFilter = ""
' see if there is data in cboSprintID, if so add it to the filter
If Me!cboSprintID & vbNullStr <> vbNullStr Then
strFilter = strFilter & " AND [tblTimeEntry.SprintID] = " & Me.cboSprintID
End If
If Me!cboPersonnelID & vbNullStr <> vbNullStr Then
strFilter = strFilter & " AND [tblTimeEntry.PersonnelID] = " & Me.cboPersonnelID & " "
End If
If strFilter <> "" Then
' trim off leading "AND"
frmProjectPercent.Form.Filter = Mid(strFilter, 5)
frmProjectPercent.Form.FilterOn = True
Else
frmProjectPercent.Form.Filter = ""
frmProjectPercent.Form.FilterOn = False
End If
End Sub
How do I get all records to display in my subform until I make a selection in my SprintID combobox while SprintID and PersonnelID are my LinkMaster/Child Fields?