Link to home
Start Free TrialLog in
Avatar of Murray Brown
Murray BrownFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Access VBA - List Box not filtering

I have an Access form with the following SQL behind it. It is designed to filter as a user types
into one of the boxes but it isn't. Not sure why

SELECT t_Arms.ArmPK, t_Arms.ArmType, t_Arms.ActionType, t_Arms.Manufacturer, t_Arms.SerialNo, t_Arms.Model, t_Arms.Calibre1, t_Arms.Status, t_Arms.LicenceNumberFK, t_Arms.Country, t_Arms.Source, t_Arms.SerialNo2, t_Arms.[Year Manuf]
FROM t_Arms
WHERE (((t_Arms.ArmType) Like "*" & [forms]![f_RenewArmRegistration]![ArmType].[Text] & "*") AND ((t_Arms.ActionType) Like "*" & [forms]![f_RenewArmRegistration]![ActionType].[Text] & "*") AND ((t_Arms.Manufacturer) Like "*" & [forms]![f_RenewArmRegistration]![Manufacturer].[Text] & "*") AND ((t_Arms.SerialNo) Like "*" & [forms]![f_RenewArmRegistration]![SerialNo].[Text] & "*") AND ((t_Arms.Model) Like "*" & [forms]![f_RenewArmRegistration]![Model].[Text] & "*") AND ((t_Arms.Calibre1) Like "*" & [forms]![f_RenewArmRegistration]![Calibre].[Text] & "*") AND ((t_Arms.LicenceNumberFK) Like "*" & [forms]![f_RenewArmRegistration]![LicenceNo].[Text] & "*") AND ((t_Arms.Country) Like "*" & [forms]![f_RenewArmRegistration]![Country].[Text] & "*")) OR (((t_Arms.SerialNo2) Like "*" & [forms]![f_RenewArmRegistration]![SerialNo2].[Text] & "*"));

Open in new window

Avatar of Dale Fye
Dale Fye
Flag of United States of America image

Link to home
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial