List box didnt filter after delete the text box value
-
- 3StarLounger
- Posts: 223
- Joined: 08 Oct 2017, 09:50
List box didnt filter after delete the text box value
After i delete the value in text box, the list box is showing full list (picture 3). How can the list box show back the filter list (picture 1).
You do not have the required permissions to view the files attached to this post.
-
- 3StarLounger
- Posts: 223
- Joined: 08 Oct 2017, 09:50
Re: List box didnt filter after delete the text box value
This is the database.
You do not have the required permissions to view the files attached to this post.
-
- Administrator
- Posts: 78524
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: List box didnt filter after delete the text box value
Here is a new version
Code: Select all
Private Sub txtState_Change()
Dim strWhere As String
Select Case grpOrders
Case 1 ' Zone America
strWhere = strWhere & " AND Zone='AMERICA'"
Case 2 ' Zone Europe
strWhere = strWhere & " AND Zone='EUROPE'"
Case 3 ' others Zone
strWhere = strWhere & " AND Zone='OTHERS'"
Select Case grpOrders1
Case 1 ' with orders pending
strWhere = strWhere & " AND Country='ASIA'"
Case 2 ' without pending orders
strWhere = strWhere & " AND Country='AFRICA'"
End Select
End Select
If Not IsNull(Me.cmbYEAR) And Me.cmbYEAR <> "<All>" Then
strWhere = strWhere & " AND YEAR = '" & Me.cmbYEAR & "'"
End If
If Me.txtState.Text = "" Then
strWhere = " WHERE " & Mid(strWhere, 6)
Me.cmbState.RowSource = "SELECT Dummy FROM tblAll UNION SELECT STATEID FROM Master" & strWhere
Else
strWhere = strWhere & " AND StateID Like '" & Me.txtState.Text & "*'"
strWhere = " WHERE " & Mid(strWhere, 6)
Me.cmbState.RowSource = "SELECT Dummy FROM tblAll WHERE Dummy <> ""<All>"" UNION SELECT STATEID FROM Master" & strWhere
End If
End Sub
Best wishes,
Hans
Hans
-
- 3StarLounger
- Posts: 223
- Joined: 08 Oct 2017, 09:50
-
- 3StarLounger
- Posts: 223
- Joined: 08 Oct 2017, 09:50
Re: List box didnt filter after delete the text box value
How come the No Dun not able to filter by year, state and parti?
You do not have the required permissions to view the files attached to this post.
-
- Administrator
- Posts: 78524
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: List box didnt filter after delete the text box value
I get error messages when I try to open Menu_Search. You have removed too much from the database.
You do not have the required permissions to view the files attached to this post.
Best wishes,
Hans
Hans
-
- 3StarLounger
- Posts: 223
- Joined: 08 Oct 2017, 09:50
Re: List box didnt filter after delete the text box value
Hi Hans, I'm manage to solved the previous query after few try. Now I have another query need your help.
After I select the No DUN, how can I make the DUN item in highlight.
To enter this page, you select the Menu_CALON and click inquiry.
After I select the No DUN, how can I make the DUN item in highlight.
To enter this page, you select the Menu_CALON and click inquiry.
You do not have the required permissions to view the files attached to this post.
-
- Administrator
- Posts: 78524
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: List box didnt filter after delete the text box value
This doesn't work either - I get the same error messages.
Best wishes,
Hans
Hans
-
- 3StarLounger
- Posts: 223
- Joined: 08 Oct 2017, 09:50
Re: List box didnt filter after delete the text box value
Hi Hans, I'm manage to solved the previous query after few try.
-
- Administrator
- Posts: 78524
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands