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

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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.
 
Thanks for getting back! Here it is.

IIf([Forms]![TestForm]![TextA]="Z","*",[Forms]![TestForm]![TextA])
 
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
 
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.
 
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.
 
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.
 
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.
 
Back
Top