User Select fields for query

frostysnoman

New member
Local time
Today, 16:32
Joined
Oct 11, 2004
Messages
6
Hi everyone, this might not be possible in Access, (2k) but I need to create a form that allows the user to select filters to a table, first country, second client, third implementer, however the query needs to return the full list if nothing is selected. I.E. can select from any of the three, but if nothing is selected ( or null) then the full list is displayed. The problem I am having is that the way I have completed with or statements gives results where not all colums are considered. Please help!
 
Sql

SELECT data.DAIBID, data.Region, data.Country, data.Project, data.Start, data.End, data.Implementer, data.Amount, data.Practice, data.[DAI Group], data.Client, data.[Project or Contract #], data.[Key Personnel], data.Subcontractors, data.[Contract Type], data.[IQC (if TO)]
FROM data
WHERE (((data.Country)=[user].[input1]) OR ((data.Implementer)=[user].[input8]) OR ((data.[DAI Group])=[user].[input2])) OR ((([user].[input1]) Is Null)) OR ((([user].[input8]) Is Null)) OR ((([user].[input2]) Is Null));

I need the user.input1 user.input8 and user.input2 to be filters, but not manditory, basically.... all possiblities, that are independent, but only filter on top of other inputs.
 

Users who are viewing this thread

Back
Top Bottom