Dave,
In the reset event click, you are resetting the listbox rowsource to b.
and b is on CONST
Code:
Public Const b As String = "SELECT DISTINCT BusinessID, BusinessName, CategoryID, SubCategoryID, CategoryName, SubCategoryName, DBA, CategoryEntityID, BusinessEntityID, BusinessAddressID, AddressTypeID, cboDataValue, Address, City, State, ZipCode, County, Reference, EntityReference, Active, Preferred, Solicit, BusinessPhoneID, PhoneNumber From qryBusinessSearch"
where as the Rowsource for the list in the Property Data is
Code:
SELECT DISTINCT qryBusinessSearch.BusinessID, qryBusinessSearch.BusinessName, qryBusinessSearch.CategoryID, qryBusinessSearch.SubCategoryID, qryBusinessSearch.CategoryName, qryBusinessSearch.SubCategoryName
FROM qryBusinessSearch
ORDER BY qryBusinessSearch.[BusinessName];
These are not the same.
When you reset, you should be using the rowsource with the DISTINCT if you want unique records.
I suggest you revise part of the RESET code to the following:
' now set the listbox back to default
' Me.LstBusinessSearch.RowSource = b '<<<<Comment this line
'
'This is the replacement to provide the Distinct values after hitting reset.
Code:
Me.LstBusinessSearch.RowSource = "SELECT DISTINCT qryBusinessSearch.BusinessID, " _
& "qryBusinessSearch.BusinessName," _
& "qryBusinessSearch.CategoryID, qryBusinessSearch.SubCategoryID," _
& "qryBusinessSearch.CategoryName," _
& "qryBusinessSearch.SubCategoryName" _
& " FROM qryBusinessSearch " _
& " ORDER BY qryBusinessSearch.[BusinessName];"
Works on my copy of your database.