A family of Microsoft relational database management systems designed for ease of use.
Hi,
Thank you for your response I tried but it gives me the following error:
Compile error: Method or data not found
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi All,
Please assist correct my code below to reset the filter i.e to show all records after filtering a record on a subform.
The unbound combo with a name cboMobile1 and the reset command button is on the main form. It filters out the requested record but when the reset command button is pressed it does not show all records but only the one it filtered.
My reset command code is as follows:
Private Sub cmdReset_Click()
Dim ctl As Control
For Each ctl In Me.Section(acHeader).Controls
Select Case ctl.ControlType
Case acTextBox, acComboBox
ctl.Value = Null
Case acCheckBox
ctl.Value = False
End Select
Next
Me.FilterOn = False
End Sub
A family of Microsoft relational database management systems designed for ease of use.
Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.
Hi,
Thank you for your response I tried but it gives me the following error:
Compile error: Method or data not found
Hi. Me.FilterOn = False applies to the form where the button is located. Since you said the button is on the main form but want to reset the filter on the subform, you are just resetting the filter on the main form. To reset the filter on the subform, you'll have to add the subform control's name. For example:
Me.SubformControlName.Form.FilterOn = False
Hope it helps...