Adding "All" selection to a combo box that acts as a filter for an SQL statement
My form has a combo box which is bound to a query that selects a list of member numbers. The value selected the goes onto filter a list driven by an SQL statement.
This works fine when a single member is selected from the combo. But obviously i want a "select all" or * wildcard option.
Question is 2 parts.
1. How do i add the all or wildcard option to the bound combo?
2. How do i code the all or wildcard option into the SQL statement?
Is it something like is not null ?
My form has a combo box which is bound to a query that selects a list of member numbers. The value selected the goes onto filter a list driven by an SQL statement.
Code:
Private Function PopulateADO(qpMemberNo As Long)
Dim cnn As ADODB.Connection
Dim rst As ADODB.Recordset
Set cnn = CurrentProject.Connection
Set rst = New ADODB.Recordset
Dim strSQL As String
strSQL = "SELECT [PEOPLE_MEMBERSHIP MASTER].MemberNo,....[LOADS MORE]
"WHERE [PEOPLE_MEMBERSHIP MASTER].MemberNo =" & qpMemberNo
..[MORE STUFF]
End Function
Private Sub ComboMember_AfterUpdate()
Call PopulateADO(Me.ComboMember)
End Sub
This works fine when a single member is selected from the combo. But obviously i want a "select all" or * wildcard option.
Question is 2 parts.
1. How do i add the all or wildcard option to the bound combo?
2. How do i code the all or wildcard option into the SQL statement?
Is it something like is not null ?