M Costumes
Member
- Local time
- Today, 12:02
- Joined
- Feb 9, 2021
- Messages
- 75
I've written a search query to search tbl: Inventory with cbo boxes to select the criteria on a form. I have one criteria that is not filtering and I can't quite figure out why--it is set up exactly like all the others.
No matter what is selected on the form for "BodyType" it will return all records that meet the other criteria, completely ignoring what was selected for "BodyType". Originally I had options for "BodyType" as child, female, male, neutral and I thought the issue might be the m-a-l-e in two words and the "*" picking up on that, so I changed them to M and F, but it didn't seem to help. All the records do have either a M or F value. Any thoughts? Happy to provide any additional info. Thanks!
SQL:
SELECT Inventory.Photo1, Inventory.InventoryID, Inventory.SetID, Inventory.ItemName, Inventory.Description, Inventory.Period, Inventory.Color, Inventory.GarmentType, Inventory.GarmentSubType, Inventory.ATCShow, Inventory.BodyType, Inventory.Size, Inventory.ChestBust, Inventory.Waist, Inventory.Hip, Inventory.InOutSeam, Inventory.Condition, Inventory.RentalRate
FROM Inventory
where Like "*" & [Forms]![frmSearchInventory]![cboBodyType] & "*" Or [Forms]![frmSearchInventory]![cboBodyType] Is Null
No matter what is selected on the form for "BodyType" it will return all records that meet the other criteria, completely ignoring what was selected for "BodyType". Originally I had options for "BodyType" as child, female, male, neutral and I thought the issue might be the m-a-l-e in two words and the "*" picking up on that, so I changed them to M and F, but it didn't seem to help. All the records do have either a M or F value. Any thoughts? Happy to provide any additional info. Thanks!