I have a checkbox selection form, where the user searches for any vendor that matches any selected machine:
SELECT qrySelectMach.VendNo, qrySelectMach.VendName, qrySelectMach.VendMachMattGrind, qrySelectMach.VendMachThrdGrind, qrySelectMach.VendMachCylGrind, qrySelectMach.VendMachIDGrinder, qrySelectMach.VendMachBlanchGrind, qrySelectMach.VendMach15Lat, qrySelectMach.VendMach35Lat, qrySelectMach.VendMach3ALat, qrySelectMach.VendMachAxisLat, qrySelectMach.VendMachAxisMC, qrySelectMach.VendMachWireEDM, qrySelectMach.VendMachPlunEDM, qrySelectMach.VendMachKT, qrySelectMach.VendMachBull, qrySelectMach.VendMachT20, qrySelectMach.VendMach1015V, qrySelectMach.VendMachV655, qrySelectMach.VendMachMeuser, qrySelectMach.VendMachZL15, qrySelectMach.VendMachZL35, qrySelectMach.VendMachWeld
FROM qrySelectMach
WHERE (((qrySelectMach.VendMachMattGrind)=True And (qrySelectMach.VendMachMattGrind)=[Forms]![frmSelectMach]![VendMachMattGrind])) OR
.
.
.
OR (((qrySelectMach.VendMachWeld)=True And (qrySelectMach.VendMachWeld)=[Forms]![frmSelectMach]![VendMachWeld]));
While this works for any vendor that matches any selected machine, how can I select only the vendors that match all of the selected machines? I tried replacing the ORs with ANDs, but that returns nothing unless all of the checkboxes are checked, and a vendor has all of it's machines checked. Is this possible through a straight query, or do I need to build a temp file to query against?
Also, is there a way to rate the success of a match? If three checkboxes are checked, a vendor matching all 3 would rate 100, 2 out of 3 rates 67, etc..
Thanks,
Hende
SELECT qrySelectMach.VendNo, qrySelectMach.VendName, qrySelectMach.VendMachMattGrind, qrySelectMach.VendMachThrdGrind, qrySelectMach.VendMachCylGrind, qrySelectMach.VendMachIDGrinder, qrySelectMach.VendMachBlanchGrind, qrySelectMach.VendMach15Lat, qrySelectMach.VendMach35Lat, qrySelectMach.VendMach3ALat, qrySelectMach.VendMachAxisLat, qrySelectMach.VendMachAxisMC, qrySelectMach.VendMachWireEDM, qrySelectMach.VendMachPlunEDM, qrySelectMach.VendMachKT, qrySelectMach.VendMachBull, qrySelectMach.VendMachT20, qrySelectMach.VendMach1015V, qrySelectMach.VendMachV655, qrySelectMach.VendMachMeuser, qrySelectMach.VendMachZL15, qrySelectMach.VendMachZL35, qrySelectMach.VendMachWeld
FROM qrySelectMach
WHERE (((qrySelectMach.VendMachMattGrind)=True And (qrySelectMach.VendMachMattGrind)=[Forms]![frmSelectMach]![VendMachMattGrind])) OR
.
.
.
OR (((qrySelectMach.VendMachWeld)=True And (qrySelectMach.VendMachWeld)=[Forms]![frmSelectMach]![VendMachWeld]));
While this works for any vendor that matches any selected machine, how can I select only the vendors that match all of the selected machines? I tried replacing the ORs with ANDs, but that returns nothing unless all of the checkboxes are checked, and a vendor has all of it's machines checked. Is this possible through a straight query, or do I need to build a temp file to query against?
Also, is there a way to rate the success of a match? If three checkboxes are checked, a vendor matching all 3 would rate 100, 2 out of 3 rates 67, etc..
Thanks,
Hende