Reply
 
Thread Tools Display Modes
  #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







  #2   Report Post  
Peter Jamieson
 
Posts: n/a
Default

Both times it prits
exactly what you see not the results that you want.


Can you tell us exactly what you /are/ seeing? You probably know that all
the {} braces in your nested field statements must be the special field
braces you can insert using ctrl-F9, but it would be useful to be sure
before going any further.

Peter Jamieson
"Dennis at Arcadia" Dennis at wrote in
message ...
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









Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
mail merge from excel that changes my format from UK to US format mark Mailmerge 0 January 21st 05 03:01 PM
Is there a template for a research paper in APA format? StanTheMan Microsoft Word Help 1 January 19th 05 02:35 AM
Opening A Text File With Word--Fixing Format KlikThis Microsoft Word Help 2 December 22nd 04 02:16 PM
Maintaining the format of linked tables. James Tables 1 December 8th 04 01:30 PM
Mailmerge from EXCEL, custom format problem TonyB Mailmerge 1 December 1st 04 04:41 PM


All times are GMT +1. The time now is 09:43 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"