I have a Table of about 3000 items. The table structure is given in the Design View in enclosed file. I want to set up a query on internal code, and Group/SubGroup category of the items. For this I created a form with text fields and a query in line with the video below
https://www.youtube.com/watch?v=CTiA_4Me0cI
The structure of the forms and the criteria is shown in screenshots in the enclosed file and the criteria of 2 fields is as below (just in case it is not clear in the screen shots). What I want is that either or all search fields must work - meaning even I put one criteria and leave others blank, query must give records of all items which fulfill this one query of one field. If 2 fields are used, then result should be of 2 fields in AND condition. Partial text like Fab for Fabric should also work
Like "*" & [Forms]![ItemSearchfrm]![txtGroup] & "*"
Like "*" & [Forms]![ItemSearchfrm]![txtSubGroup1] & "*"
The query works in a strange way. I just put Bag in Group and I get 60,000 records and all with one particular combination of Sub groups. Even if I put values in the form for sub groups, these are not recognised. Screen shots of the form and the result of the query are also part of the screen shots in the file
Is my approach right?
What am I doing incorrectly?