Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Mailmerge and Fax / January 2005

Tip: Looking for answers? Try searching our database.

If then else with conditional format using comapre AND

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Dennis at Arcadia - 25 Jan 2005 13:49 GMT
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
Peter Jamieson - 25 Jan 2005 21:31 GMT
> 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
> the problem and what we tried to sove it is below.  I even tried Geek by
> the
[quoted text clipped - 48 lines]
> Thanks
> Dennis
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.