I've posted a thread before but no one could help or I wasn't clear enough. I want to create a simple search form using combo.
The table looks like this tblMaterials (material_id, name, group, vendor)
The querry I use (qryTest): SELECT tblMaterials.material_id, tblMaterials.name, tblMaterials.vendor, tblMaterials.Group
FROM tblMaterials
GROUP BY tblsMaterials.material_id, tblMaterials.name, tblMaterials.vendor, tblsMaterials.Group
HAVING (((tblsMaterials.vendor)=[Forms]![Test]![vendor])) OR (((tblMaterials.Group)=[Forms]![Test]![Group]))
ORDER BY tblMaterials.material_id;
(The red part doesn't work)
I have 2 unbound combo,
1st. Get's all Vendors from table: SELECT tblvendors.vendor_id, tblvendors.vendor_name FROM tblvendor ORDER BY tblvendor.vendor_name;
2nd Has Groups: SELECT tblGroups.Group_id, tblGroups.Group_name FROM tblGroups ORDER BY Group_name;
and third combo linked to a querry: Format source is set to qryTest.name and Row Source: SELECT DISTINCT qryTest.name FROM qryTest ORDER BY name
Let's concentrate on a problem now, I want user to have an options like that, list the materials by Vendor - just pick a vendor from a list and see the results in third combo, if there is a need narrow the search with a group, the result: all groups of materials available from particular vendor.
Another user may want to search only by the group skipping the vendor combo and get the results.
The reason why I want to have the results in a combo is that I need to have a further pick option.
Hope I gave you the whole picture now.
Any help would be highly appreciated
Mark
Sorry for posting the thread few times
The table looks like this tblMaterials (material_id, name, group, vendor)
The querry I use (qryTest): SELECT tblMaterials.material_id, tblMaterials.name, tblMaterials.vendor, tblMaterials.Group
FROM tblMaterials
GROUP BY tblsMaterials.material_id, tblMaterials.name, tblMaterials.vendor, tblsMaterials.Group
HAVING (((tblsMaterials.vendor)=[Forms]![Test]![vendor])) OR (((tblMaterials.Group)=[Forms]![Test]![Group]))
ORDER BY tblMaterials.material_id;
(The red part doesn't work)
I have 2 unbound combo,
1st. Get's all Vendors from table: SELECT tblvendors.vendor_id, tblvendors.vendor_name FROM tblvendor ORDER BY tblvendor.vendor_name;
2nd Has Groups: SELECT tblGroups.Group_id, tblGroups.Group_name FROM tblGroups ORDER BY Group_name;
and third combo linked to a querry: Format source is set to qryTest.name and Row Source: SELECT DISTINCT qryTest.name FROM qryTest ORDER BY name
Let's concentrate on a problem now, I want user to have an options like that, list the materials by Vendor - just pick a vendor from a list and see the results in third combo, if there is a need narrow the search with a group, the result: all groups of materials available from particular vendor.
Another user may want to search only by the group skipping the vendor combo and get the results.
The reason why I want to have the results in a combo is that I need to have a further pick option.
Hope I gave you the whole picture now.
Any help would be highly appreciated
Mark
Sorry for posting the thread few times
Last edited: