Code:
Private Sub ListCountrySE_AfterUpdate()
Dim varItem As Variant
Dim strSQL As String
If Me.ListCountrySE.ItemsSelected.Count Then
strSQL = "Select ID_Number, Nature_of_Fees from TotalCostsSmallEntity where [Country] in ('"
For Each varItem In Me.ListCountrySE.ItemsSelected
strSQL = strSQL & Me.ListCountrySE.ItemData(varItem) & "','"
Next varItem
strSQL = Left(strSQL, Len(strSQL) - 2) & ") ORDER BY ID_Number"
Else
strSQL = "Select ID_Number, Nature_of_Fees from TotalCostsSmallEntity ORDER BY ID_Number"
End If
Me.ListNOFSE.RowSource = strSQL
End Sub
I need the Nature_of_Fees list box to only pull in distinct values from the TotalCostsSmallEntity database.
Can someone help me edit the above code so that strSQL result only shows distinct values ?
thanks!!