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 Filter Listbox

Hi. I have an Access ListBox with the following RowSource. I want 5to filter by specific  ArmPK on opening the form. Do I reset the Row Source or is there a better way to do this?

SELECT t_Arms.ArmPK, t_Arms.ArmType, t_Arms.ActionType, t_Arms.Manufacturer, t_Arms.Calibre1, t_Arms.SerialNo, t_Arms.SerialNo2
FROM t_Arms
WHERE (((t_Arms.ArmType) Like "*" & [forms]![f_List_Arm]![txtSearchArm].[Text] & "*")) OR (((t_Arms.ActionType) Like "*" & [forms]![f_List_Arm]![txtSearchArm].[Text] & "*")) OR (((t_Arms.Manufacturer) Like "*" & [forms]![f_List_Arm]![txtSearchArm].[Text] & "*")) OR (((t_Arms.Calibre1) Like "*" & [forms]![f_List_Arm]![txtSearchArm].[Text] & "*")) OR (((t_Arms.SerialNo) Like "*" & [forms]![f_List_Arm]![txtSearchArm].[Text] & "*")) OR (((t_Arms.SerialNo2) Like "*" & [forms]![f_List_Arm]![txtSearchArm].[Text] & "*"))
ORDER BY t_Arms.ArmType, t_Arms.ActionType;
ASKER CERTIFIED SOLUTION
Avatar of Jim Dettman (EE MVE)
Jim Dettman (EE MVE)
Flag of United States of America image

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

ASKER

Thanks Jim. There will be no more than around 1000 records
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
thanks very much