S
ssignore
Hello MS Online Community.
I have created a very simply query on which one of my key forms is based.
However, the WHERE segment of the SQL is not working. The SQL has been
copied below.
When the prompt 'Please enter Analyst Name' appears after I hit 'Run', I
will enter an Analyst Name, but the query will still return all records
instead of just those of the specified Analyst.
Do I need different wording?
Many thanks for the help!
Simone
SELECT [01_TblInitial].Status, [01_TblInitial].Unit,
[01_TblInitial].[Analyst Name], [01_TblInitial].Task, [01_TblInitial].[As-Is
Process Flow], [01_TblInitial].[As-Is Narrative], [01_TblInitial].[Next
Steps/Comments], [01_TblInitial].[Completion Date]
FROM 01_TblInitial
WHERE ((([01_TblInitial].[Analyst Name])=[Please enter Analyst Name] Or
([01_TblInitial].[Analyst Name]) Is Not Null))
ORDER BY IIf([01_TblInitial]![Status]="In
Progress",1,IIf([01_TblInitial]![Status]="Approved",2,IIf([01_TblInitial]![Status]="Backburner",3,IIf([01_TblInitial]![Status]="Completed",4,IIf([01_TblInitial]![Status]="Not
Started",5,IIf([01_TblInitial]![Status]="On Hold",6,"")))))),
[01_TblInitial].Unit;
I have created a very simply query on which one of my key forms is based.
However, the WHERE segment of the SQL is not working. The SQL has been
copied below.
When the prompt 'Please enter Analyst Name' appears after I hit 'Run', I
will enter an Analyst Name, but the query will still return all records
instead of just those of the specified Analyst.
Do I need different wording?
Many thanks for the help!
Simone
SELECT [01_TblInitial].Status, [01_TblInitial].Unit,
[01_TblInitial].[Analyst Name], [01_TblInitial].Task, [01_TblInitial].[As-Is
Process Flow], [01_TblInitial].[As-Is Narrative], [01_TblInitial].[Next
Steps/Comments], [01_TblInitial].[Completion Date]
FROM 01_TblInitial
WHERE ((([01_TblInitial].[Analyst Name])=[Please enter Analyst Name] Or
([01_TblInitial].[Analyst Name]) Is Not Null))
ORDER BY IIf([01_TblInitial]![Status]="In
Progress",1,IIf([01_TblInitial]![Status]="Approved",2,IIf([01_TblInitial]![Status]="Backburner",3,IIf([01_TblInitial]![Status]="Completed",4,IIf([01_TblInitial]![Status]="Not
Started",5,IIf([01_TblInitial]![Status]="On Hold",6,"")))))),
[01_TblInitial].Unit;