I have a form with several fields. Two of the fields are [Machine] and [Machine Type]. Instead of typing in the machine type, the manager wants it to be automatically filled when the machine name is entered. I want to do an IIF statement in the control source, but I can't get it to work.
I have 8 machines and 3 machines types. I have put the IIf statement in the control source for the machine types but I keep getting a invalid syntax. I admit I have not written many if statements and it is probably something very easy that I am doing wrong, but I have spent hours trying to get this to work!!!
=IIf([Machine]=1-9514,[Machine Type],"XL",IIf([Machine]=2-9514,[Machine Type],"XL,IIF([Machine]=6-9514,[Machine Type],"XLS")))
There is a lot more, but this is a pretty good example of how I have it in the control source.
I would appreciate your help.
Thanks!
I have 8 machines and 3 machines types. I have put the IIf statement in the control source for the machine types but I keep getting a invalid syntax. I admit I have not written many if statements and it is probably something very easy that I am doing wrong, but I have spent hours trying to get this to work!!!
=IIf([Machine]=1-9514,[Machine Type],"XL",IIf([Machine]=2-9514,[Machine Type],"XL,IIF([Machine]=6-9514,[Machine Type],"XLS")))
There is a lot more, but this is a pretty good example of how I have it in the control source.
I would appreciate your help.
Thanks!