Here is the SQL:
SELECT tbl_Flooring.[EFD ID], tbl_Flooring.[Manuf Item Number],
tbl_Flooring.Manufacturer, tbl_Manufacturer.Manufacturer,
tbl_Flooring.Description, tbl_Flooring.[Sq Ft per Case], tbl_Flooring.[In
Stock], tbl_Flooring.[Weight per Sq Ft], tbl_Flooring.Species,
tbl_Flooring.Color, tbl_Flooring.Width, tbl_Width.Width,
tbl_Flooring.Thickness, tbl_Type.Type, tbl_Flooring.Finish, tbl_Flooring.[Top
Layer], tbl_Flooring.Grade, tbl_Flooring.Price, tbl_Flooring.Collection,
tbl_Flooring.Floatable, tbl_Flooring.Clickable, tbl_Flooring.Glueable,
tbl_Flooring.Nailable, tbl_Flooring.[On Special], tbl_Flooring.[Special
Price], tbl_Flooring.Comments, tbl_Flooring.DISCONTINUED
FROM tbl_Width INNER JOIN (tbl_Manufacturer INNER JOIN (tbl_Type INNER JOIN
tbl_Flooring ON tbl_Type.TypeID = tbl_Flooring.Type) ON
tbl_Manufacturer.ManufacturerID = tbl_Flooring.Manufacturer) ON
tbl_Width.WidthID = tbl_Flooring.Width
WHERE (((tbl_Flooring.Manufacturer)=[Forms]![frm_Search]![Manufacturer]) AND
((tbl_Flooring.Width)=[Forms]![frm_Search]![Width])) OR
((([Forms]![frm_Search]![Width]) Is Null And ([Forms]![frm_Search]![Width])
Is Null) AND (([Forms]![frm_Search]![Manufacturer]) Is Null)) OR
((([Forms]![frm_Search]![Manufacturer]) Is Null And
([Forms]![frm_Search]![Manufacturer]) Is Null));
KARL DEWEY said:
Open your query in design view, click on VIEW - SQL View, highlight all,
copy, and paste in a post.
Tdahlman said:
I'm sorry but I'm not sure what that means.
taught myself everything I know in Access so the technical name for things
is not my strong suit.
KARL DEWEY said:
I tested with 2 and it worked.
Post the SQL of your query.
:
That didn't quite work.
Right now I only have 2 of the criteria working so that I can figure this
out without changing 10 different things.
I have one called [Manufacturer] and one called [Width].
If I make the selection in for Width, but not Manufacturer then it shows me
all of the entries that I have without a filter. But if I only make a
selection for the Manufacturer then I don't get any results.
Any other suggestions?
:
Try this --
[Forms]![frm_Search]![Manufacturer] Or [Forms]![frm_Search]![Manufacturer]
Is Null
:
I have query with the criteria of multiple fields based on a form (i.e.
[Forms]![frm_Search]![Manufacturer]. So when my query runs it would filter
the results to match what is entered into the form.
The problem is that I have 10 different search criteria in my form and want
to be able to run the same query without having to fill in every search
criteria.
Right now if I leave one of the criteria blank then my query results will
only pull up entries in which the that field is blank.
How can I make my query criteria only be used if a selection is made in the
form?
I hope that explains what I'm looking for.
Thanks in advance
Travis