Building Complex Criteria for Queries in Access 2007

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])
 
K

KARL DEWEY

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")
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top