Building Complex Criteria for Queries in Access 2007

  • Thread starter Thread starter Hector Ibarra
  • Start date Start date
H

Hector Ibarra

Can anyone provide me feedback on how I can make a criteria like the one
shown below work (so far I get the reply that the criteria is too complex for
calculation). Ultimate Goal= Allow "null" entries in the parameters form
without making the final query results "empty".

Is there an expression in Access that woudl allow me to specify that if a
particular entry in the parameter form then Access should include all options
within a single category/variable?

IIf(IsNull([Forms]![Parameters].[secType]),([Securities].[secType])="B" And
([Securities].[secType])="I",([Securities].[secType])=[Forms]![Parameters].[secType])
 
Try this as criteria in design view --
IIf([Forms]![Parameters]![secType] Is Not Null,
[Forms]![Parameters]![secType], "B") OR IIf([Forms]![Parameters]![secType] Is
Not Null, [Forms]![Parameters]![secType], "I")
 
Back
Top