IIF (Expr, "*", ,[Forms]![TestForm]![TextA])

T

Tony

The wild card * does not select any of the records when used in the Criteria
Cell in an IIF comparison.

However if I insert the Like "*" by itself in the Criteria Cell without the
IIF it works.

Does anyone know if this is possible?

Thank You in advance!

Tony Z.
 
T

Tony

Thanks for getting back! Here it is.

IIf([Forms]![TestForm]![TextA]="Z","*",[Forms]![TestForm]![TextA])
 
D

Douglas J. Steele

Try

Like IIf([Forms]![TestForm]![TextA]="Z","*",[Forms]![TestForm]![TextA])


--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)



Tony said:
Thanks for getting back! Here it is.

IIf([Forms]![TestForm]![TextA]="Z","*",[Forms]![TestForm]![TextA])

Lynn Trapp said:
Could you post the exact IIF statement you used?

--
Lynn Trapp
MS Access MVP
www.ltcomputerdesigns.com
Access Security: www.ltcomputerdesigns.com/Security.htm
Jeff Conrad's Big List: www.ltcomputerdesigns.com/JCReferences.html
 
K

Ken Snell [MVP]

Hmmm... this thread is very similar to one in which I have been working....
<g >


--

Ken Snell
<MS ACCESS MVP>



Douglas J. Steele said:
Try

Like IIf([Forms]![TestForm]![TextA]="Z","*",[Forms]![TestForm]![TextA])


--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)



Tony said:
Thanks for getting back! Here it is.

IIf([Forms]![TestForm]![TextA]="Z","*",[Forms]![TestForm]![TextA])

Lynn Trapp said:
Could you post the exact IIF statement you used?

--
Lynn Trapp
MS Access MVP
www.ltcomputerdesigns.com
Access Security: www.ltcomputerdesigns.com/Security.htm
Jeff Conrad's Big List: www.ltcomputerdesigns.com/JCReferences.html


The wild card * does not select any of the records when used in the
Criteria
Cell in an IIF comparison.

However if I insert the Like "*" by itself in the Criteria Cell
without
the
IIF it works.

Does anyone know if this is possible?

Thank You in advance!

Tony Z.
 
L

Lynn Trapp

I noticed that too, Ken. Same form name and field name. same criteria.

--
Lynn Trapp
MS Access MVP
www.ltcomputerdesigns.com
Access Security: www.ltcomputerdesigns.com/Security.htm
Jeff Conrad's Big List: www.ltcomputerdesigns.com/JCReferences.html


Ken Snell said:
Hmmm... this thread is very similar to one in which I have been
working.... <g >


--

Ken Snell
<MS ACCESS MVP>



Douglas J. Steele said:
Try

Like IIf([Forms]![TestForm]![TextA]="Z","*",[Forms]![TestForm]![TextA])


--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)



Tony said:
Thanks for getting back! Here it is.

IIf([Forms]![TestForm]![TextA]="Z","*",[Forms]![TestForm]![TextA])

:

Could you post the exact IIF statement you used?

--
Lynn Trapp
MS Access MVP
www.ltcomputerdesigns.com
Access Security: www.ltcomputerdesigns.com/Security.htm
Jeff Conrad's Big List: www.ltcomputerdesigns.com/JCReferences.html


The wild card * does not select any of the records when used in the
Criteria
Cell in an IIF comparison.

However if I insert the Like "*" by itself in the Criteria Cell
without
the
IIF it works.

Does anyone know if this is possible?

Thank You in advance!

Tony Z.
 
K

Ken Snell [MVP]

That would mean that Doug and you and I all get "double credit", right? < g
--

Ken Snell
<MS ACCESS MVP>

Lynn Trapp said:
I noticed that too, Ken. Same form name and field name. same criteria.

--
Lynn Trapp
MS Access MVP
www.ltcomputerdesigns.com
Access Security: www.ltcomputerdesigns.com/Security.htm
Jeff Conrad's Big List: www.ltcomputerdesigns.com/JCReferences.html


Ken Snell said:
Hmmm... this thread is very similar to one in which I have been
working.... <g >


--

Ken Snell
<MS ACCESS MVP>



Douglas J. Steele said:
Try

Like IIf([Forms]![TestForm]![TextA]="Z","*",[Forms]![TestForm]![TextA])


--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)



Thanks for getting back! Here it is.

IIf([Forms]![TestForm]![TextA]="Z","*",[Forms]![TestForm]![TextA])

:

Could you post the exact IIF statement you used?

--
Lynn Trapp
MS Access MVP
www.ltcomputerdesigns.com
Access Security: www.ltcomputerdesigns.com/Security.htm
Jeff Conrad's Big List: www.ltcomputerdesigns.com/JCReferences.html


The wild card * does not select any of the records when used in the
Criteria
Cell in an IIF comparison.

However if I insert the Like "*" by itself in the Criteria Cell
without
the
IIF it works.

Does anyone know if this is possible?

Thank You in advance!

Tony Z.
 
L

Lynn Trapp

Of course...LOL

--
Lynn Trapp
MS Access MVP
www.ltcomputerdesigns.com
Access Security: www.ltcomputerdesigns.com/Security.htm
Jeff Conrad's Big List: www.ltcomputerdesigns.com/JCReferences.html


Ken Snell said:
That would mean that Doug and you and I all get "double credit", right? <
g
--

Ken Snell
<MS ACCESS MVP>

Lynn Trapp said:
I noticed that too, Ken. Same form name and field name. same criteria.

--
Lynn Trapp
MS Access MVP
www.ltcomputerdesigns.com
Access Security: www.ltcomputerdesigns.com/Security.htm
Jeff Conrad's Big List: www.ltcomputerdesigns.com/JCReferences.html


Ken Snell said:
Hmmm... this thread is very similar to one in which I have been
working.... <g >


--

Ken Snell
<MS ACCESS MVP>



Try

Like IIf([Forms]![TestForm]![TextA]="Z","*",[Forms]![TestForm]![TextA])


--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)



Thanks for getting back! Here it is.

IIf([Forms]![TestForm]![TextA]="Z","*",[Forms]![TestForm]![TextA])

:

Could you post the exact IIF statement you used?

--
Lynn Trapp
MS Access MVP
www.ltcomputerdesigns.com
Access Security: www.ltcomputerdesigns.com/Security.htm
Jeff Conrad's Big List: www.ltcomputerdesigns.com/JCReferences.html


The wild card * does not select any of the records when used in the
Criteria
Cell in an IIF comparison.

However if I insert the Like "*" by itself in the Criteria Cell
without
the
IIF it works.

Does anyone know if this is possible?

Thank You in advance!

Tony Z.
 
Top