IIF statement

  • Thread starter Thread starter fin
  • Start date Start date
F

fin

Can a query criteria contain an IIF Statement? I am trying
to write an IIF Statement that will either bring up the
results based on a sigle piece of data or all the records.

IIF(Forms![Name]![cmbProSel]="All People",<All Records>,
Forms![Name]![cmbProSel])

I don't know what woudl go in <All Records> if possible.

Thanks!
 
Dear Fin:

There's an easy way to do this using different logic:

WHERE (SomeColumn = Forms![Name]![cmbProSel]
OR Forms![Name]![cmbProSel] = "All People")

Tom Ellison
Microsoft Access MVP
Ellison Enterprises - Your One Stop IT Experts
 
That was GREAT!! Perfect! Thanks Tom! I was struggling
with this for days.
-----Original Message-----
Dear Fin:

There's an easy way to do this using different logic:

WHERE (SomeColumn = Forms![Name]![cmbProSel]
OR Forms![Name]![cmbProSel] = "All People")

Tom Ellison
Microsoft Access MVP
Ellison Enterprises - Your One Stop IT Experts


Can a query criteria contain an IIF Statement? I am trying
to write an IIF Statement that will either bring up the
results based on a sigle piece of data or all the records.

IIF(Forms![Name]![cmbProSel]="All People",<All Records>,
Forms![Name]![cmbProSel])

I don't know what woudl go in <All Records> if possible.

Thanks!

.
 

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

Back
Top