jca Posted March 21, 2005 Author Posted March 21, 2005 Case( mod(char1+8;26)=1, dsd_code = dsd_code & "A", mod(char1+8;26)=2, dsd_code = dsd_code & "B", ) I have to do a calculation to know what letter correspond to the number... I get the "an operator (e.g. +, -, ...) is expected here" message... why!? I also tried multiple if, like: If( Mod( char1 + 8 ; 26 )=1 ; dsd_code & "A"; "") If( Mod( char1 + 8 ; 26 )=2 ; dsd_code & "B"; "") If( Mod( char1 + 8 ; 26 )=3 ; dsd_code & "C"; "") I get the same error... anyone can help to go through that step?!?
jca Posted March 21, 2005 Posted March 21, 2005 Case( mod(char1+8;26)=1, dsd_code = dsd_code & "A", mod(char1+8;26)=2, dsd_code = dsd_code & "B", ) I have to do a calculation to know what letter correspond to the number... I get the "an operator (e.g. +, -, ...) is expected here" message... why!? I also tried multiple if, like: If( Mod( char1 + 8 ; 26 )=1 ; dsd_code & "A"; "") If( Mod( char1 + 8 ; 26 )=2 ; dsd_code & "B"; "") If( Mod( char1 + 8 ; 26 )=3 ; dsd_code & "C"; "") I get the same error... anyone can help to go through that step?!?
sbg2 Posted March 21, 2005 Posted March 21, 2005 Strange I copy and paste both your examples into an FMP file, replace your fields with fields in my table, no errors. When you get the error what part of the calculation is highlighted as the error?
sbg2 Posted March 21, 2005 Posted March 21, 2005 Strange I copy and paste both your examples into an FMP file, replace your fields with fields in my table, no errors. When you get the error what part of the calculation is highlighted as the error?
Vaughan Posted March 22, 2005 Posted March 22, 2005 Case( mod(char1+8;26)=1, dsd_code & "A", mod(char1+8;26)=2, dsd_code & "B", ) The syntax for Case is Case ( test1, result1, test2, result2,...) The result dsd_code = dsd_code & "A" is not really a result; the "dsd_code = dsd_code" is really a test. Part of the problem is that you have not told us what the calculation field's name is. A calculation field cannot modify another field, so I have to assume that the field is dsd_code. In this case the expression should be Case( mod(char1+8;26)=1, dsd_code & "A", mod(char1+8;26)=2, dsd_code & "B" ) There should be no comma after the last expression.
Recommended Posts
This topic is 7189 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now