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!

.
 
Back
Top