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

IIF statement matching with another field 1

Status
Not open for further replies.

ImperialBlether

Instructor
Feb 22, 2009
2
GB
Hi - I'm new here and would be really grateful for some help. I've looked through past threads but haven't found anything similar.

I've got a form on Access with a subform.

On the subform, I want to use IIF to say 'If the item chosen on the drop down (in the subform) is X, then I want the field called 'Area' to show here. If not, I want 'Perimeter' to show.

Area and Perimeter are on the main form.

Please can anyone help?
 
Lets say your Main form is called "Mainform" and it has two fields: Area and Perimeter.

Then your subform contains two fields
Combo123, AorP

You might want to try something like this in the OnChange of the Combo123

IIF(me!Combo123 = "Area", Me!AorP = Forms!Mainform!Area, Me!AorP=Forms!Mainform!Perimeter)

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top