B
Beresford
Hi guys,
new user to access 2000 and i am trying to create a search
query that will allow me to enter in a value and return that value. The part
i am having trouble with is i need to do this for many fields and if i use
the method i came up with, when i leave a entry empty using the "AND"
function i get nothing and when i use the "OR" function i get all the values
for both. maybe you guys can help me get in the right direction.
this is the command i am using in SQL:
SELECT [Chain Machine prod Machine list].Description, [Chain Machine prod
Machine list].Manufacturer, [Chain Machine prod Machine list].[Model No#],
[Chain Machine prod Machine list].[Serial No#], [Chain Machine prod Machine
list].[Gold Tag], [Chain Machine prod Machine list].Dept, [Chain Machine prod
Machine list].Location, [Chain Machine prod Machine list].CAPACITY
FROM [Chain Machine prod Machine list]
WHERE ((([Chain Machine prod Machine list].Dept)=[INSERT DEPT:])) OR
((([Chain Machine prod Machine list].Location)=[INSERT Location:])) OR
((([Chain Machine prod Machine list].Dept)=[INSERT DEPT:])) OR ((([Chain
Machine prod Machine list].Location)=[INSERT Location:]));
new user to access 2000 and i am trying to create a search
query that will allow me to enter in a value and return that value. The part
i am having trouble with is i need to do this for many fields and if i use
the method i came up with, when i leave a entry empty using the "AND"
function i get nothing and when i use the "OR" function i get all the values
for both. maybe you guys can help me get in the right direction.
this is the command i am using in SQL:
SELECT [Chain Machine prod Machine list].Description, [Chain Machine prod
Machine list].Manufacturer, [Chain Machine prod Machine list].[Model No#],
[Chain Machine prod Machine list].[Serial No#], [Chain Machine prod Machine
list].[Gold Tag], [Chain Machine prod Machine list].Dept, [Chain Machine prod
Machine list].Location, [Chain Machine prod Machine list].CAPACITY
FROM [Chain Machine prod Machine list]
WHERE ((([Chain Machine prod Machine list].Dept)=[INSERT DEPT:])) OR
((([Chain Machine prod Machine list].Location)=[INSERT Location:])) OR
((([Chain Machine prod Machine list].Dept)=[INSERT DEPT:])) OR ((([Chain
Machine prod Machine list].Location)=[INSERT Location:]));