March 5, 200223 yr I want to check a field for a number of different variables and insert another variable into a different field depending on the result I have tried If field1 = "A" or "B" or "C" Insert text (field2) "A" End If If field = "X" or "Y" or "Z" Insert text (field2) "X" End If But this doesn't seem to work - Please help Regards Nick
March 5, 200223 yr I take it you are doing this in a script. You are close... quote: If field1 = "A" or "B" or "C" Insert text (field2) "A" End If If field = "X" or "Y" or "Z" Insert text (field2) "X" End If ON your if lines, to trap for or you must add the field you want to trap on. eg. If field1 = "A" or field1 = "B" or field1 = "C" Insert text (field2) "A" End If
March 5, 200223 yr Have you thought about putting this in a calculation field instead of a script. Then it will update automatically. Do it in a case statement and you get a lot more ease of use. Case ( field1 = "A" or field1="B" or "Field1="C", "A", field1 = "A" and field2="X", "AX" (and add as many more items as you wish, just seperate by commas) Anyway, glad we fixed your initial post.
Create an account or sign in to comment