Hi everyone. I am trying to filter a subform when I open the parent form from a different form with an option group. So, the first form pops up with the options: 1) Show "Active" Contracts 2) Show All Contracts. If the user selects 1, I want it to open the specific customer form (frmContractsForm) and filter the subform (frmContractSub) where the subform's "Status" field is "Active." Here is my code:
Thanks!
Jeff
Code:
'Display Active or All Contracts
'Open Form
DoCmd.OpenForm "frmContractForm", , , "CustomerID=" & Me.txtCustomerID
'Filter to Active or All
Select Case frameOptions
Case 1
With Forms!frmcontractform.frmContractSub
.Filter = "Status= 'Active'"
.FilterOn = True
End With
End Select
Jeff