I have a Button on a form that filters on 2 fields using the following code:
This works fine. However, I also want to filter on a field in a Subform when no record exists (or Is Null).
Subform Name: sub Rank Rate Location
Field Name: Duty Station
How do I make the Button apply a filter to the 2 fields on the Form as well as when there is no "Duty Station" on the Subform?
Code:
Private Sub cmd_NavyDue_Click()
With Me
.FilterOn = True
DoCmd.ApplyFilter , "[Branch] = 'NAVY' And [Count]>1"
Me.OrderBy = "[Person ID] DESC"
Me.OrderByOn = True
End With
End Sub
Subform Name: sub Rank Rate Location
Field Name: Duty Station
How do I make the Button apply a filter to the 2 fields on the Form as well as when there is no "Duty Station" on the Subform?
Comment