G
Guest
I'm running a parameter query from a control on a form, with the form setting
9 parameters. I've got the query running beautifully when I run it without
the form, but when i try to run it with the form, it doesn't filter out the
unwanted records, and I can't figure out why. I've got it set up so that if
the user leaves any of the fields/parameters blank, then the query should
return all values that meet the remaining parameters. (Yes, Tom, and John -
this is the same project from before - it's working except for this little
thing!) Any help would be greatly appreciated...here's the SQL:
SELECT [Product Keys].[Content/Project File Name], [Product Keys].[File
Location], [Product Keys].[Source Origination], [Product Keys].[Information
Product Type], [Product Keys].[CMS Product Version], [Product Keys].[Product
Line], [Product Keys].[User Profile(s)]
FROM [Product Keys]
WHERE ((([Content/Project File
Name]=[Forms]![FormToRunQuery]![Content/Project File Name] Or
Nz([Forms]![FormToRunQuery]![Content/Project File Name],"")="")<>False) AND
(([Source Origination]=[Forms]![FormToRunQuery]![Source Origination] Or
Nz([Forms]![FormToRunQuery]![Source Origination],"")="")<>False) AND
(([Information Product Type]=[Forms]![FormToRunQuery]![Information Product
Type] Or Nz([Forms]![FormToRunQuery]![Information Product
Type],"")="")<>False) AND (([CMS Product
Version]=[Forms]![FormToRunQuery]![CMS Product Version] Or
Nz([Forms]![FormToRunQuery]![CMS Product Version],"")="")<>False) AND
(([Product Line]=[Forms]![FormToRunQuery]![Product Line] Or
Nz([Forms]![FormToRunQuery]![Product Line],"")="")<>False) AND (([User
Profile(s)]=[Forms]![FormToRunQuery]![User Profile(s)] Or
Nz([Forms]![FormToRunQuery]![User Profile(s)],"")="")<>False));
9 parameters. I've got the query running beautifully when I run it without
the form, but when i try to run it with the form, it doesn't filter out the
unwanted records, and I can't figure out why. I've got it set up so that if
the user leaves any of the fields/parameters blank, then the query should
return all values that meet the remaining parameters. (Yes, Tom, and John -
this is the same project from before - it's working except for this little
thing!) Any help would be greatly appreciated...here's the SQL:
SELECT [Product Keys].[Content/Project File Name], [Product Keys].[File
Location], [Product Keys].[Source Origination], [Product Keys].[Information
Product Type], [Product Keys].[CMS Product Version], [Product Keys].[Product
Line], [Product Keys].[User Profile(s)]
FROM [Product Keys]
WHERE ((([Content/Project File
Name]=[Forms]![FormToRunQuery]![Content/Project File Name] Or
Nz([Forms]![FormToRunQuery]![Content/Project File Name],"")="")<>False) AND
(([Source Origination]=[Forms]![FormToRunQuery]![Source Origination] Or
Nz([Forms]![FormToRunQuery]![Source Origination],"")="")<>False) AND
(([Information Product Type]=[Forms]![FormToRunQuery]![Information Product
Type] Or Nz([Forms]![FormToRunQuery]![Information Product
Type],"")="")<>False) AND (([CMS Product
Version]=[Forms]![FormToRunQuery]![CMS Product Version] Or
Nz([Forms]![FormToRunQuery]![CMS Product Version],"")="")<>False) AND
(([Product Line]=[Forms]![FormToRunQuery]![Product Line] Or
Nz([Forms]![FormToRunQuery]![Product Line],"")="")<>False) AND (([User
Profile(s)]=[Forms]![FormToRunQuery]![User Profile(s)] Or
Nz([Forms]![FormToRunQuery]![User Profile(s)],"")="")<>False));