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!

3 conditions formula Version: 2003

Status
Not open for further replies.

spalla

Technical User
Oct 10, 2004
12
CA
can anybode tell me how i can set a control with a formula that looks for 3 conditions example:

if field a = xx than "formula"
if field a = yy than "formula"
if field a = zz than "formula"

thank you for your help
 
How are ya spalla . . . .

Try this in the [blue]Control Source[/blue] of the Control:
Code:
[blue]=IIF(fieldA = xx, formula xx, IIF(fieldA = yy, formula yy, IIF(fieldA = zz, formula zz, ""))
)[/blue]

Calvin.gif
See Ya! . . . . . .
 
spalla . . . .

That last parenthese didn't come out right. Here it is corrected:
Code:
[blue]=IIF(fieldA = xx, formula xx, IIF(fieldA = yy, formula yy, IIF(fieldA = zz, formula zz, "")))[/blue]

If you have any problems, post it back as you have it . . .

Calvin.gif
See Ya! . . . . . .
 
one mor little question what about if i want to leave the 3rd condition without a formula and i want to imput the value manually?

if field a = zz than "manual imput"
is there a way to do that?
 
OK spalla . . . . .

Replace with the following:
Code:
[blue]=IIF(fieldA = xx, formula xx, IIF(fieldA = yy, formula yy, IIF(fieldA = zz, [b]InputBox("[purple]PromptText[/purple]","[purple]TitleBarText[/purple]")[/b], "")))[/blue]

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

Part and Inventory Search

Sponsor

Back
Top