View Single Post
  #1   Report Post  
Dennis at Arcadia
 
Posts: n/a
Default If then else with conditional format using comapre AND

the problem and what we tried to sove it is below. I even tried Geek by the
minute and they gave up.

I have four counselors that handle different parts of the alphabet.
Depending on your last name you are assigned a counselor. The if then has
the capability to put in the right counselor if it can evaluate the last name
field twice. MS says to use the compare with an AND but as you can see it
does not work. When we do the merge it prints the logic statement and not
the desired results.

if last name is between A-G your counselor is #1
if last name is between H-K your counselor is #2
if last name is between L-P your counselor is #3
if last name is between Q-Z your counselor is #4

To do the above it must compare the last_name field twice for a start point
and an end point and then put in that counselor. If the logic does not work
it skips the step.

If I can get one to work I can get them all to work.

This is a test to see if I can get the compare function to work on a simple
database apbyhs05.dbf

Here is the exact example that Microsoft gives:
{ IF { = AND ( { COMPARE { MERGEFIELD CustomerNumber } = 4 }, { COMPARE {
MERGEFIELD CustomerRating } = 3 } ) } = 1 "Satisfactory" "Unsatisfactory"}

Now our try to replicate

{ IF { = AND ( { COMPARE { 860 } = 1000 }, { COMPARE { 410 } = 550 } ) } =
1 "Satisfactory" "Unsatisfactory"}


{ IF { = AND ( { COMPARE { Scozzari } €œAz€ }, { COMPARE { Scozzari } €œGz€
} ) } = 1 "Russ" "No Russ"}

Neither of the examples worked. I tried the ones with numeric fields just
to see if the examples only worked with numeric fields. Both times it prits
exactly what you see not the results that you want.

Any help would be appreciatied
Thanks
Dennis