Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Double chk box Expression Help Needed 1

Status
Not open for further replies.

number2

Technical User
Oct 25, 2001
284
US
I want to return a value if 2 different check boxes are checked (-1) Something like:

IIf([rtxtchk]=-1) And IIf([ltxtchk]=-1),[bilattxt],"")

What is wrong with this expression? (sorry, I have been working too many hours !!)
 
How are ya number2 . . . . .

Try this:
Code:
[blue]IIf([rtxtchk] And [ltxtchk],[bilattxt],"")[/blue]


Calvin.gif
See Ya! . . . . . .
 
Hey Ace, thanks a million. Works like a charm as:

IIf([righttxtchk] And [lefttxtchk]=-1,[bilattxt],"")

This is easily the 100th time this forum as saved my bacon!

 
number2 . . . . .

Although your last post will work, your not seeing the logic. The result returned from the expression [blue][Value1] And [Value2][/blue] is what your missing.
Code:
[blue]IIf([Value1] And [Value2],[bilattxt],"")

If [blue][b]Value1[/b][/blue] is IF [blue][b]Value2[/b][/blue] is [purple][b]Result[/b][/purple] is
------------ ------------ ---------
False        False        False
False        True         False
True         False        False
True         True         True

After the expression is evaluated the IIf really looks like this:

IIf([purple][b]Result[/b][/purple],[bilattxt],"")[/blue]

Calvin.gif
See Ya! . . . . . .
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top