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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Form Help!

Status
Not open for further replies.

Caryisms

Technical User
Oct 17, 2001
132
US
How do I write an expression for a text box in a form that will allow a conditional statement based on another field.

ie. If Field 1 = "Primary", then this text box = [Field 2] & " " & [Field 3]

Thanks!

 
Syntax: IIf («expr», «truepart», «falsepart»)

set control source of the textbox (this is off top of my head, so will probably need tweeking):

=Iif ([Field 1] = "Primary",[Field 2] & " " & [Field 3]," ")

In this example it inserts a space if [Field 1] is not = "Primary"

Karl
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top