I have a form that pulls from a querie. The queries gives the end user different fields to choose from.
txtbox1 Hit or Miss
txtbox2 Yes or No
txtbox3 Service, Flawless 5, STAR, Finance
ok, if you right this as an "or" function in a queries, it will give you either one, i want it to be like the "and" function, but sometimes people wont choose a box, so if you leave the box blank it returns no results. This is the way i have it written now:
SELECT EntryTable.EntryID, EntryTableMain.EntryTableMainID, EntryTableMain.EntryDate, EntryTableMain.GroupName, EntryTableMain.YourName, EntryTable.Flawless5, EntryTable.SubjectFab, EntryTable.Action, EntryTable.LocationSpecificArea, EntryTable.Department, EntryTable.HitorMiss, EntryTable.ExternallInternall, EntryTable.DetailComment, EntryTable.AdditionalInformation
FROM EntryTable LEFT JOIN EntryTableMain ON EntryTable.EntryLink = EntryTableMain.EntryTableMainID
WHERE (((EntryTable.Flawless5)=[Forms]![Searchfrm]![Flawless5])) OR (((EntryTable.SubjectFab)=[Forms]![Searchfrm]![SubjectFab])) OR (((EntryTable.Action)=[Forms]![Searchfrm]![Action])) OR (((EntryTable.LocationSpecificArea)=[Forms]![Searchfrm]![LocationSpecificArea])) OR (((EntryTable.Department)=[Forms]![Searchfrm]![Department])) OR (((EntryTable.HitorMiss)=[Forms]![Searchfrm]![HitorMiss])) OR (((EntryTable.ExternallInternall)=[Forms]![Searchfrm]![ExternallInternall]))
ORDER BY EntryTableMain.EntryDate;
txtbox1 Hit or Miss
txtbox2 Yes or No
txtbox3 Service, Flawless 5, STAR, Finance
ok, if you right this as an "or" function in a queries, it will give you either one, i want it to be like the "and" function, but sometimes people wont choose a box, so if you leave the box blank it returns no results. This is the way i have it written now:
SELECT EntryTable.EntryID, EntryTableMain.EntryTableMainID, EntryTableMain.EntryDate, EntryTableMain.GroupName, EntryTableMain.YourName, EntryTable.Flawless5, EntryTable.SubjectFab, EntryTable.Action, EntryTable.LocationSpecificArea, EntryTable.Department, EntryTable.HitorMiss, EntryTable.ExternallInternall, EntryTable.DetailComment, EntryTable.AdditionalInformation
FROM EntryTable LEFT JOIN EntryTableMain ON EntryTable.EntryLink = EntryTableMain.EntryTableMainID
WHERE (((EntryTable.Flawless5)=[Forms]![Searchfrm]![Flawless5])) OR (((EntryTable.SubjectFab)=[Forms]![Searchfrm]![SubjectFab])) OR (((EntryTable.Action)=[Forms]![Searchfrm]![Action])) OR (((EntryTable.LocationSpecificArea)=[Forms]![Searchfrm]![LocationSpecificArea])) OR (((EntryTable.Department)=[Forms]![Searchfrm]![Department])) OR (((EntryTable.HitorMiss)=[Forms]![Searchfrm]![HitorMiss])) OR (((EntryTable.ExternallInternall)=[Forms]![Searchfrm]![ExternallInternall]))
ORDER BY EntryTableMain.EntryDate;