Hello, i am new to the forum as you can guess as i sincirely have some issues with a query.
Ok here is the details, one of the many tables that i have is named Inventory.
SELECT Inventory.CategoryID, Inventory.BrandID, Inventory.ID, Inventory.FirstName, Inventory.LastName
FROM Inventory
WHERE (((Inventory.CategoryID) Like "*" & [Forms]![Inventory]![Category] & "*") AND ((Inventory.BrandID) Like "*" & [Forms]![Inventory]![Brand] & "*") AND ((Inventory.FirstName) Like "*" & [Forms]![Inventory]![Namee] & "*") AND ((Inventory.LastName) Like "*" & [Forms]![Inventory]![Surnamee] & "*"));
I call this as a customise query because end-user have four fields to fill but none of that is neccesary.
for example the fields are: Name,Surname,Category ,Brand
User can fill what ever he wants and then can click the Search button for the query to work.
My problem here is that i store info about users and about the hardwares that are related to them, but there hardware that they do not belong to any user and when the user search lets say for a Category name Keyboard and a Brand named Trust the query do not show any result.
As query will show results only in hardwares that are related to user.
I know what is the problem here, is because i have "AND" in all fields so in order the query to be corrert all fields must be true.
So if a user is not related to a hardware the query wont work.
My question here is what i can do for it ?