Hello,
I made a continuous form from a query with 2 comboBoxes to filter the query.
in the query the code of each column is:
for the combo boxes the code is:
and
It all works fine. I can use both combobox to filter or just 1 and leave the other blank and it still works.
However when I use both and the criteria is not found, for example if a category doesn't have any records with that status, it will crash saying:
Run-Time Error "2137"
You can't use Find or replace now
anyone have any ideas on how to fix this.
I made a continuous form from a query with 2 comboBoxes to filter the query.
in the query the code of each column is:
Code:
Like "*" & [Forms]![Part_List_form]![Stat_Box_Select] & "*"
Code:
Like "*" & [Forms]![Part_List_form]![Cat_Box_Select] & "*"
Code:
Private Sub Cat_Box_Select_AfterUpdate()
Me!Category.SetFocus
If IsNull(Me!Cat_Box_Select.Value) Then
Exit Sub
Else:
DoCmd.FindRecord (Me!Cat_Box_Select.Value)
End If
DoCmd.ShowAllRecords
Code:
Private Sub Stat_Box_Select_AfterUpdate()
Me!Status.SetFocus
If IsNull(Me!Stat_Box_Select.Value) Then
Exit Sub
Else:
DoCmd.FindRecord (Me!Stat_Box_Select.Value)
End If
DoCmd.ShowAllRecords
End Sub
However when I use both and the criteria is not found, for example if a category doesn't have any records with that status, it will crash saying:
Run-Time Error "2137"
You can't use Find or replace now
anyone have any ideas on how to fix this.