Hi everyone,
I've been working on a search criteria that filters a listbox based on what the user types into the search bar or using a date range criteria. While I finally got the date range to work but now the search bar won't filter the list box as the user begins typing as it previously was. There is a button where users can add in new info (e.g. a new agency, their address, insurance info, etc) and even though it updates on the agency table, nothing shows up on the list box. Do list boxes have a limit of rows they display? Here's a photo of the SQL and I suspect the problem is here, particularly in the WHERE clause.
**if the picture is too small, here's the SQL
SELECT tblAgency.AgencyName, tblSubsidiary.Subsidiary, tblAgency.AAEndDate, tblAgency.LiabilityInsurance, tblAgency.WSIBEmployeeDeclaration, tblAgency.Address, tblAgency.City, tblAgency.Province, tblAgency.PostalCode, tblAgency.ContactName,
tblAgency.ContactEmail, tblAgency.ContactPhoneNumber, tblPrograms.Program
FROM tblPrograms INNER JOIN (tblSubsidiary INNER JOIN tblAgency ON tblSubsidiary.ID = tblAgency.[Subsidiary].Value) ON tblPrograms.ID = tblAgency.Programs.Value
WHERE (((tblAgency.AAEndDate) Between Forms!frmMain!txtFrom And Forms!frmMain!txtTo) OR ((tblAgency.LiabilityInsurance) Between forms!frmMain!txtFrom And forms!frmMain!txtTo) And ((tblAgency.AgencyName & tblSubsidiary.Subsidiary) Like "*" &
forms!frmMain!SrchTxt & "*"))
ORDER BY tblAgency.AgencyName;
AAEndDate and LiabilityInsurance are the two date columns in the list box and txtFrom and txtTo are the date text boxes themselves set as Short Date format. Even though I don't get a syntax error (missing operator) error message anymore, as it stands, the date range filters work but the text filter, as the user types, the list box doesn't work anymore. If you guys wouldn't mind having a look at this and maybe highlight any potential errors, that would be much appreciated!