If it works, great. Don't build a cathedral when you need a bungalow.
If it doesn't work, then here's a code skeleton you can use to build the query. You'll have to fix all the names, add your specific return fields, and adjust the cases to the values being returned to the frame by your radio buttons.
When testing this, uncomment the message box that shows you the SQL. Even if you're not yet proficient at understanding the SQL at a glance, a human can see the missing spaces when the words run together, and that's the most common error I make in coding a section like this.
And don't be afraid to ask questions.
Code:
Private Sub BuildQuery()
Dim WhereDone As Boolean
Dim strListSQL As String
' the select fields are static
WhereDone = False
strListSQL = "SELECT [Field1], [Field2], Field3] " & _
"FROM [MyTable] "
' always test for confirmed = False or Null
' confirmed <> True is a single test to get the same thing
strListSQL = strListSQL & "WHERE ( " & _
"([Confirmed] <> True) "
Wheredone = True
' I'm leaving the test in this code for wheredone = True
' even though it will always be True in this usage.
'
' That way this code can be cloned and adapted without
' forgetting to put the test back in
'
Select Case F1frame.Value
Case 0
' do nothing
Case 1
If WhereDone Then
strListSQL = strListSQL & " AND "
Else
strListSQL = strListSQL & " WHERE ("
WhereDone = True
End If
strListSQL = strListSQL & _
"( ([Address] IS NOT Null) " & _
"AND ([Phone] IS Null) " & _
"AND ([POBox] IS Null) )"
Case 2
If WhereDone Then
strListSQL = strListSQL & " AND "
Else
strListSQL = strListSQL & " WHERE ("
WhereDone = True
End If
strListSQL = strListSQL & _
"( ([Address] IS Null) " & _
"AND ([Phone] IS NOT Null) " & _
"AND ([POBox] IS Null) )"
Case 3
If WhereDone Then
strListSQL = strListSQL & " AND "
Else
strListSQL = strListSQL & " WHERE ("
WhereDone = True
End If
strListSQL = strListSQL & _
"( ([Address] IS Null) " & _
"AND ([Phone] IS Null) " & _
"AND ([POBox] IS NOT Null) )"
End Select
' close the where if there is one
If WhereDone Then
strListSQL = strListSQL & ") "
End If
' Add the order by clause if needed
' strListSQL = strListSQL & _
' "ORDER BY [Field1], [Field2], [Field3] "
' Add the semicolon to complete the SQL
strListSQL = strListSQL & ";"
' for testing, show sql
' MsgBox strListSQL
' load sql to form
Me.[Record Source] = strListSQL
Me.Requery
' OR load SQL to a list box
' lstLeft.RowSource = ""
' lstLeft.RowSourceType = "Table/Query"
' lstLeft.RowSource = strListSQL
' Me.lstLeft.Requery
End Sub